I have a problem in JMS Client lookup. Our present network configuration is
When I try to lookup the Server from my Client I am getting an error like connection refused.
But I can able to connect through browser(i.e. http).
In the jndi lookup I specified the NAT address. The code can able to communicate the NAT address and able to identify the corresponding local Computer IP Address also.But I am getting connection refused exception.
What could be the problem?
My JNDI Lookup Code is
java.util.Properties properties = new java.util.Properties();
InitialContext iniCtx = new InitialContext(properties);
Object tmp = iniCtx.lookup("ConnectionFactory");
TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
I am getting the following error if try to run my client
Exception in thread "main" javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.27.136 (Internal IP Address)
Do I need to specify anything else?
Look in FAQ wikki about JBoss behind firewall. The problem is that RMI-stub, generated by JBoss and sent to client, points to incorrect address. One way is to set some system's props while starting JBoss.