wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes client application connecting to local server after failing to connect to remote server  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "client application connecting to local server after failing to connect to remote server  " Watch "client application connecting to local server after failing to connect to remote server  " New topic
Author

client application connecting to local server after failing to connect to remote server

naveen tirumalasetty
Greenhorn

Joined: Apr 01, 2009
Posts: 1
hi,
I am seeing a strange problem in getting reference of initial context. client application supposed to make remote method (sync) call to remote server. it is working fine normally. but when connection is lost between remote server and client, it is failing to get initial context (which is fine as it is expected). But after a while when connection is re-established client application is connecting to local server instead of remote server (means it is getting reference of wrong initial context). btw, local and remote server both have same port number.
I am wondering if anyone has seen this problem. Here I am pasting the code that gets initial context.

Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", remoteLocation);
props.setProperty("org.omg.CORBA.ORBInitialPort", String.valueOf(remotePort));
jndiContext = new InitialContext(props);

-naveen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: client application connecting to local server after failing to connect to remote server
 
Similar Threads
EJB remote interface problem over internet
EJB3 Remote Performance problem
Starting problem
glassfish to JBoss communication through RMI
ejb lookup problem