Hi folks!

I'm trying a comunication via RMI between two web applications.
All works fine if the two applications run on the same server, but when the
two applications run on different servers, the following error occurs:

javax.naming.NameNotFoundException: myobjectname. Root exception is
org.omg.CosNaming.NamingContextPackage.NotFound

[26/02/04 9.22.21:348 CET] 4b430615 SystemErr R at
com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_ resolve_complete_info(WsnO
ptimizedNamingImpl.java:964)

[26/02/04 9.22.21:348 CET] 4b430615 SystemErr R at
com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBa se.resolve_complete_info(W
snOptimizedNamingImplBase.java:1383)

This is the code I use:

Server side:
Hashtable parms = new Hashtable();

parms.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnIniti
alContextFactory");

InitialContext ctx = new InitialContext(parms);

MyObejctImpl object = new MyObjectImpl();

PortableRemoteObject.exportObject(object);

ctx.rebind("myobjectname",object);



Client side:

Hashtable parms = new Hashtable();

parms.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnIniti
alContextFactory");

parms.put(Context.PROVIDER_URL,"iiop://");

InitialContext ctx = new InitialContext(parms);

Object beanO = ctx.lookup("myobjectname");

bean= (MyObejct) PortableRemoteObject.narrow (beanO,MyObejct.class);



Someone can help me?

Thanks

Simone