users@glassfish.java.net

Remote lookup between Glassfish servers

From: <glassfish_at_javadesktop.org>
Date: Mon, 22 Mar 2010 18:54:52 PDT

Hello,
I need to do a remote lookup using JNDI from a stateless session bean running in a Glassfish v3 server (no standalone client) to a session bean in another glassfish v3 server.
I've read docs and https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#cross-appserverremoteref in particular.
I can't use the aproach of corbaname:iiop:<host>:<port>#<global_jndi_name> and injecting a @EJB because I have to do a JNDI lookup programmaticaly. I need to get the reference and retry if the server is not available. I also have to do connections to different servers, so i do need a JNDI lookup.
i've tried https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#nonJavaEEwebcontainerRemoteEJB but I get an exception:

 java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory

My question is: I must treat my JEE application as a standalone client and add the client jar file with my missing class? Which is that client jar file? I've followed the appserv-rt.jar and javaee.jar files in glassfish/lib dir but the client classes are not there. (They just have xml files).

(in JBoss I include a file named jbossall-client.jar and that's all. I gues I need the equivalent Glassfish jar)

thanks for any help,
Ignacio
[Message sent by forum member 'icordoba']

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