[jboss-user] [EJB 3.0] - Re: Looking up Datasource from Client

jantzen do-not-reply at jboss.com
Wed Jan 3 21:46:00 EST 2007


Hey Gommo, how's it going?  I'm able to do a JNDI lookup for the datasource using the value of the <jta-data-source> tag.  So, I belive this would work for you:

 
  | InitialContext ctx = new InitialContext();
  | Object ds = ctx.lookup("java:/PostgresDS");
  | 

I'm not clear on why in the datasource config there's no leading "java:/", maybe somebody more knowledgeable about JNDI can explain that.

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

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



More information about the jboss-user mailing list