[jboss-user] [JNDI/Naming/Network] - Re: Difference between 'java: Namespace' and 'Global JNDI Na

jaikiran do-not-reply at jboss.com
Wed May 2 10:37:27 EDT 2007


I went back and looked at the code that you posted:
anonymous wrote : 
  | Context ctx = new InitialContext();
  | DataSource ds = (DataSource) ctx.lookup("project");

This should be:

Context ctx = new InitialContext();
  | DataSource ds = (DataSource) ctx.lookup("java:/project");

And with this lookup code, you need not have the <use-java-context> attribute in the ds.xml.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042452#4042452

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042452



More information about the jboss-user mailing list