users@glassfish.java.net

Failed to lookup EJB deployed in server instance named instance1

From: <forums_at_java.net>
Date: Sun, 23 Sep 2012 10:25:19 -0500 (CDT)

I have deployed an EJB in a server instance named instance1 which is not the
Domain Admin Server. When I tried to lookup this EJB with client code,
Properties p = new Properties(); p.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
p.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
p.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
p.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
p.setProperty("org.omg.CORBA.ORBInitialPort", "3700"); Context context = new
InitialContext(p); TestBInterface obj =
(TestBInterface)context.lookup("TestBBean"); obj.test(); I have
NamingNotFoundException. But when I deployed the same EJB to DAS, the code
above succeed to find EJB instance. How can I lookup EJB in server instance
which is not DAS?

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