This content has been marked as final.
Show 3 replies
-
1. Re: Binding to JNDI
adrian.brock Jun 25, 2003 1:19 PM (in response to scottpy)The java: namespace is not available when
you use "java.naming.provider.url"
Anything you put there with this attribute set will
be lost.
Use the global namespace.
Regards,
Adrian -
2. Re: Binding to JNDI
scottpy Jun 25, 2003 2:33 PM (in response to scottpy)Ah! I understand. I have tried to the same piece of code without "java:" in the namespace, and I am still unable to bind this value to JNDI.
Any more thoughts?
Thanks!
-Scott -
3. Re: Binding to JNDI
adrian.brock Jun 25, 2003 8:36 PM (in response to scottpy)This simple test works for me:
InitialContext ctx = new InitialContext();
ctx.bind("blah", new String("hello"));
ctx = new InitialContext();
System.out.println(ctx.lookup("blah"));
My jndi.properties file contains:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost
Regards,
Adrian