I've been banging my head for 2 days now, using every tip and trick I've found on the web.
I have a need to resolved an InitialContext to an app server from an app running inside another. Both instances of glassfish are on different machines (no firewall between them and I know tcp traffic flows ok between them) and they are both standard installs from the NetBeans installer (v2ur2).
So the app inside ServerA needs to contact ServerB to get to a JMS queue. You would think this would work but it doesn't:
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "jnp://machine:1099");
InitialContext ctx = new InitialContext(env);
I have tried many variations of this, including using iiop://machine:3700 and the S1ASCtxFactory class for Context.INITIAL_CONTEXT_FACTORY. What happens is the environment does indeed have the correct values but the returned InitialContext is always to the current container rather than the remote machine.
Can anyone shed light on this? Much appreciated in advance.
[Message sent by forum member 'mlsmithjr' (mlsmithjr)]
http://forums.java.net/jive/thread.jspa?messageID=325829