users@glassfish.java.net

Re: Lookup problem using JNDI with Glassfish 9.1

From: sankara rao bhogi <Sankara.Rao_at_Sun.COM>
Date: Thu, 26 Apr 2007 15:13:37 +0530

glassfish_at_javadesktop.org wrote:
> 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");
>

Please have a look at:
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB

regards
sankar
> Can someone help me?
> [Message sent by forum member 'giolo' (giolo)]
>
> http://forums.java.net/jive/thread.jspa?messageID=214419
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


-- 
"The best insurance for tomorrow is the effective use of today.”
-- Why Smart People Do Dumb Things by Dr. Mortimer Feinberg and John