users@glassfish.java.net

InitalContext lookup() hangs on standalone client

From: <forums_at_java.net>
Date: Mon, 18 Mar 2013 13:00:30 -0500 (CDT)

I have a glassfish server and several stand alone java SE clients running on
the same network but different machines. This code works fine if the server
and client are running on the same machine: Context ctx = new
InitialContext(); OrderNumber orderNumberServer = (OrderNumber)
ctx.lookup("java:global/FoodServerEJB/OrderNumberSingleton"); However, this
code hangs on the ctx.lookup() line when running on a different machines. By
"hang", I mean the code does not throw any exceptions, there is no logging
output on the server. I have run the client with the
-Dorg.omg.CORBA.ORBInitialHost=192.168.1.98 and
-Dorg.omg.CORBA.ORBInitialPort=3700 but this does nothing. I have also tried
initializing the context by: Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialHost", "192.168.1.98");
props.put("org.omg.CORBA.ORBInitialPort", "3700"); Context ctx = new
InitialContext(props); When I do the following on the command line: telnet
192.168.1.98 3700 I get the following response: Trying 192.168.1.98
Connecting to 192.168.1.98 Escape character is '^]' I have tried scouring the
internet for a solution, including the tutorial at
http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#nonJavaEEwebcontainerRemoteEJB
I have JMS messaging resources that need to be looked up, and they too hang
at the ctx.lookup step. Thanks.

--
[Message sent by forum member 'EnchantedForestFire']
View Post: http://forums.java.net/node/895757