-
1. Re: Remote clients unable to find jndi name.
yzhang_jboss Apr 25, 2002 3:29 PM (in response to norm32)What version of JBoss are you using? Try using "ConnectionFactory" as the JNDI look up string and see if it solves your problem. eg:
// Get the connection factory
TopicConnectionFactory topicFactory =
(TopicConnectionFactory)context.lookup("ConnectionFactory");
Cathy -
2. Re: Remote clients unable to find jndi name.
norm32 Apr 25, 2002 4:53 PM (in response to norm32)Upon further invetigation, I see that I am getting a CommunicationException.
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect]
For some reason its trying to go to the localhost. I'm sure the context properties are correct.
prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
prop.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
prop.put(Context.PROVIDER_URL, "jnp://10.0.0.107:1099/");
jndiContext=new InitialContext(prop);
Norm -
3. Re: Remote clients unable to find jndi name.
yzhang_jboss Apr 26, 2002 5:07 PM (in response to norm32)Do you have to use "jnp://" setting? Can you just use
prop.put(Context.PROVIDER_URL, "10.0.0.107:1099");
I assume that you are writing a plain JMS client, not a bean that sends out messages through your local container to a topic running on a remote machine. -
4. Re: Remote clients unable to find jndi name.
ecomba Apr 30, 2002 7:10 AM (in response to norm32)I have this problem too. I don´t think the solution is putting the ip address of the machine you want to access, as we face the same problem using the ip or the resolved name.... :(
-
5. Re: Remote clients unable to find jndi name.
hchirino Apr 30, 2002 9:09 AM (in response to norm32)You can bypass JNDI if you need to:
Properties props = new Properties();
props.setProperty(OILServerILFactory.SERVER_IL_FACTORY_KEY, OILServerILFactory.SERVER_IL_FACTORY);
props.setProperty(OILServerILFactory.CLIENT_IL_SERVICE_KEY, OILServerILFactory.CLIENT_IL_SERVICE);
props.setProperty(OILServerILFactory.PING_PERIOD_KEY, "1000");
props.setProperty(OILServerILFactory.OIL_ADDRESS_KEY, "localhost");
props.setProperty(OILServerILFactory.OIL_PORT_KEY, "8090");
QueueConnectionFactory cf = new SpyConnectionFactory(props);
QueueConnection c = cf.createQueueConnection();
---- OR -----
Properties props = new Properties();
props.setProperty(UILServerILFactory.SERVER_IL_FACTORY_KEY, UILServerILFactory.SERVER_IL_FACTORY);
props.setProperty(UILServerILFactory.CLIENT_IL_SERVICE_KEY, UILServerILFactory.CLIENT_IL_SERVICE);
props.setProperty(UILServerILFactory.PING_PERIOD_KEY, "1000");
props.setProperty(UILServerILFactory.UIL_ADDRESS_KEY, "localhost");
props.setProperty(UILServerILFactory.UIL_PORT_KEY, "8091");
QueueConnectionFactory cf = new SpyConnectionFactory(props);