users@glassfish.java.net

Lookup problem using JNDI with Glassfish 9.1

From: <glassfish_at_javadesktop.org>
Date: Thu, 26 Apr 2007 02:04:01 PDT

Please, can someone tell me how to set "java.naming.factory.initial" (and other properties) in order to access from a remote Java client a stateless EJB 3.0 deployed into Glassfish 9.1?

I have tryed different settings but they doesn't work:

props.setProperty("java.naming.factory.initial", "com.sun.appserv.naming.S1ASCtxFactory");
props.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");

An excerpt of the code I use is the following:
...
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.appserv.naming.S1ASCtxFactory");

props.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.1.20");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

InitialContext ic = new InitialContext(props);
Sless sless = (Sless) ic.lookup("ejb.MySless");

Can someone help me?
[Message sent by forum member 'giolo' (giolo)]

http://forums.java.net/jive/thread.jspa?messageID=214419