I had the same problem. But then I remembered something I had to do in GF v2 if GF is not local to your client. So I repeat the samething in GF v3 and I got the look up to work:
1. In the Admin Console, go to Configuration -> ORB -> IIOP Listeners -> orb-listener-1.
2. Change the Network Address from 0.0.0.0 to the actual IP of the server (say, 50.136.254.123).
3. Note the Listener Port (say, 42333).
4. Save the changes. GF didn't tell me to restart, but I did it anyway.
In my client I have:
Properties prop = new Properties();
prop.put("org.omg.CORBA.ORBInitialHost", "50.136.254.123");
prop.put("org.omg.CORBA.ORBInitialPort", "42333");
InitialContext ctx = new InitialContext(glassFishProp);
TestRemote tr = (TestRemote) ctx.lookup("java:global/MyEJB2/OperationBean");
...
It worked for me.
[Message sent by forum member 'bentsou' ]
http://forums.java.net/jive/thread.jspa?messageID=376040