users@glassfish.java.net

Re: Sending JMS to a Remote GlassFish Server problems

From: <glassfish_at_javadesktop.org>
Date: Mon, 05 May 2008 12:49:27 PDT

I know the the real solution should be to use the InitialContext(Hashtable env) constructor with the properties that I need, but going through the debug logging generated by the Sun impl classes, I can see that when using something such as:

env.put(Context.PROVIDER_URL, "iiop://127.0.0.1:6037");
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.appserv.naming.S1ASCtxFactory");

That some properties are changed, in the logging statement "WARNING: NAM1001: No Endpoints selected in com.sun.appserv.iiop.endpoints property. Using JNDI Provider URL iiop://127.0.0.1:6037 instead"

But, setting the URL in this manner still doesnt work, and it seems that the ORB host/port poperties need to be used. Setting them similarly:

env.put("org.omg.CORBA.ORBInitialHost", "localhost");
env.put("org.omg.CORBA.ORBInitialPort", "6037");

Has no effect, shown in the logging statement "WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"

Setting the ORB host/port using System.setProperty or as a JVM arg does in fact change the host/port used, and works properly (but as mentioned before, these are not viable solutions)

Is this a bug with the current impl of the Sun InitialContext class?
[Message sent by forum member 'asherwin' (asherwin)]

http://forums.java.net/jive/thread.jspa?messageID=272830