This content has been marked as final.
Show 4 replies
-
1. Re: Looking up Datasource from Client
jantzen Jan 3, 2007 9:45 PM (in response to gommo)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. -
2. Re: Looking up Datasource from Client
gommo Jan 3, 2007 9:51 PM (in response to gommo)Cool, thanks, I'll give it a try
-
3. Re: Looking up Datasource from Client
gommo Jan 3, 2007 10:18 PM (in response to gommo)It works from a sessionbean but not from the client so it appears remotely I need to address it slightly differently. Any pointers anyone?
Thanks again -
4. Re: Looking up Datasource from Client
gommo Jan 3, 2007 10:34 PM (in response to gommo)Found it. Thanks for your help. For anyone wanting to know read
http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources
You need to set use-java-context to false