Quantcast
Channel: GlassFish Related Items on Java.net
Viewing all articles
Browse latest Browse all 1091

InitalContext lookup() hangs on standalone client

$
0
0

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#nonJavaEEwebcontainer...

I have JMS messaging resources that need to be looked up, and they too hang
at the ctx.lookup step.

Thanks.


Viewing all articles
Browse latest Browse all 1091

Trending Articles