-
1. Re: JBossMQ 3.0 question.
hchirino Apr 30, 2002 11:40 PM (in response to christine)Make sure you initialize the InitialContext correctly. Either via a the jndi.properites file in the class path or an explicity Property object passed in the constructor.
Here's the example of my jndi.properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost -
2. Re: JBossMQ 3.0 question.
aarthin May 10, 2002 7:40 AM (in response to christine)Hi,
I have used JBOSS to deploy my beans and a have written a client to lookup and access the bean. Initial context was set as follows
System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url", "localhost:1099");
Client was unable to lookup the hostServer until i set the context variable java.naming.factory.url.pkgs, in the initial context as below:
System.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
However later if i remove the java.naming.factory.url.pkgs,from the initial context,compile and run the client code, it runs without any hassles.
Now why this strange behaviour?
Please reply
Regards
Arathi