[jboss-user] [JNDI/Naming/Network] - Re: Always getting not bound naming exceptions
ezanih
do-not-reply at jboss.com
Wed Jan 7 01:01:19 EST 2009
For everyone to share, there is this EXCELLENT blog (Oct 2007) from Jaikiran Pai on initial context JNDI naming convention for JBoss AS and how to name the context properly from the lookup code.
It certainly helped to solve my problem and I'm sure a lot of yours.
Here's the link:
http://jaitechwriteups.blogspot.com/search?updated-min=2007-01-01T00:00:00-08:00&updated-max=2008-01-01T00:00:00-08:00&max-results=3
One interesting point I noted is that because wrapper datasources are bound using the java: namespace, they cannot be accessed from a standalone Java client because this client runs in a different JVM from the JBoss server.
So you cannot use :
| InitialContext ic = new InitialContext();
| javax.sql.DataSource db = (javax.sql.DataSource) ic.lookup("java:OracleXE1_DS");
|
from a standalone client. What should you do to access that datasource ? (i.e. how to transfer the datasource from the java namespace to the glbal jndi namespace) ?
Many thanks, Jaikiran! :-)[/url]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199966#4199966
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199966
More information about the jboss-user
mailing list