I am writing a small utility to send JMS messages to a remote server, but I am failing to configure correctly the InitialContext (or so it seems)
code to init the Context:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, "jnp://10.10.10.10:1099/");
Context context = new InitialContext(p);
But when I run it I get an exception:
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect]
So what is baffling me is that is complaining about 127.0.0.1 event though I am configuring it for 10.10.10.10, which is alive, running jboss, no firewall, I can get a telnet session to port 1099, so it seems to be ok
Any pointers ? or helpers ?