views:

317

answers:

2

We are having some difficulties connecting our Java SE standalone client with the EJB module deployed on a remote GlassFish server.

Pointers to how we are supposed to connect our client would be appreciated.

The client code we currently has to get the initial context:

props.setProperty("org.omg.CORBA.ORBInitialHost", "*remotehost*");
props.setProperty("org.omg.CORBA.ORBInitialPort", "portNumber");

javax.naming.InitialContext ic = new javax.naming.InitialContext(props);

*We have tried several different port numbers; 3700, 7676, 8080..

The closest we are getting, got us the error: "Error in GIOP magic".

I read that jms are using port 7676 as a broker port for a bunch of dynamically generated ports, but can't figure out how to specify those ports in order to create proper port-forwards.

A: 

There seems to be some material here, which does indicate that the default port is 3700.

This reference also indicates that some particualr jars may be needed.

djna
A: 

The default port for Glassfish is 3700. I wrote an article here that gives explicit instruction on how to do this. Hope this helps. Also, make sure you're also using the correct verions of appserv-rt.jar along with all of its dependencies in your client project.

-- andrew

Andrew Thompson