[jboss-user] [Installation, Configuration & Deployment] - Re: Complicated DataSouce and JNDI javax.naming.NamingExcept
DjHitItUp
do-not-reply at jboss.com
Thu Aug 3 15:51:56 EDT 2006
Thank you so much for catching that tag name problem; however the issue still remains. My code below still doesn't work.
out.println("<H1>VERSION 2 w/ DataSource of DCPROD</H1>");
Connection con2 = null;
try {
InitialContext context = new InitialContext(null);
DataSource source = (DataSource)context.lookup("DCDEV"); // DOES NOT WORK
//DataSource source = (DataSource)context.lookup("java:/DCDEV"); // DOES WORK
con2 = source.getConnection();
out.println("DONE!");
} catch (Exception ex) {
out.println("NO SUCCESS BECAUSE " + ex.getMessage() + "");
//ex.printStackTrace(new PrintWriter(out));
} finally {
if (con2 != null) {
con2.close();
out.println("AND WE CLOSED IT!");
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962993#3962993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962993
More information about the jboss-user
mailing list