Hello there,
I have a Glassfish v2.1.1 cluster setup. I deployed an EAR file consisting a
single stateless bean to stand alone server. It has an IIOP port 3752.
My client application which will be communicating with this bean is deployed
on cluster. When i lookup bean's name, i get NameNotFoundException. Code
looks as below:
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"); if
(logger.isDebugEnabled()) { logger.debug("Looking for bean from location : "
+ PropertiesService.instance().getSchedulerOrbHost() + ":" +
PropertiesService.instance().getSchedulerOrbPort()); }
props.setProperty("org.omg.CORBA.ORBInitialHost",
PropertiesService.instance().getSchedulerOrbHost());
props.setProperty("org.omg.CORBA.ORBInitialPort",
PropertiesService.instance().getSchedulerOrbPort()); InitialContext context =
null; try { context = new InitialContext(props); } catch (NamingException e)
{ e.printStackTrace(); } String beanName = "test.OperationControllerRemote";
OperationControllerRemote remote = (OperationControllerRemote)
context.lookup(beanName);
Note that i checked JNDI tree and name "test.OperationControllerRemote" is
there.
Any opinions please?
--
[Message sent by forum member 'dc7780']
View Post: http://forums.java.net/node/828568