What is actual differnce between a local client and Remote Client and what is the reason we have two differnt types of Local home and Remote Home Interface . Is Local client means that the Local EJB is installed in the same jvm or same machine where the client reside . I want to clear my doubts in real world .
Local Client means the client that is going to access the EJB deployed on same machine as client and same JVM. To create Local EJBs, EJB spec has provided EJBLocalHome and EJBLocalObject interfaces. Local client was required due to the performance issues, so that if client and EJB reside on same machine then instead of going over the network, the container can find it locally. Say you have two EJBs which uses each other frequently, so you do the analysis and found out that if you make them local to each other then it will help improve the performance, so you can make them local.
Whereas in case of Remote client, the client doesn't know whether the EJB is deployed on same machine or on some other machine, Container will go over the network and access the EJB using RMI/IIOP which will degrade performance in some cases.
Joined: Aug 28, 2001
Thanks Ali for your reply. i understand now better.
However, I get different exception and the call has not reached the server.
javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDLmg.org/CosNaming/NamingContext/NotFound:1.0]
Joined: Oct 08, 2002
I have managed to move up, but yet to reach the bean. The problem was that the Context factory was wrong. I am using Glassfish 9.1 Update 2 and used the ldap factory com.sun.jndi.ldap.LdapCtxFactory and the Context.PROVIDER_URL,"ldap://localhost:389/o=myObjects" as mentioned Sun System Application Server 9.1 Admin guide
Do I have to run any LDAP server. If yes, how to. The JNDI name is visible in the log of the server and in the Admin Console. But having problems to reach the jndi naming service from the remote client.
The problem was that the application server's client jar was file was not present in my remote client. Application servers have a client jar file, that is intended for use of client applications of the Appserver.
For Glassfish 9.1 update 2, it is appserv-rt.jar. If our client make use of the packages such as the context factory implementation, we have to embed the jar that has this implementation. As soon as i entered the jar, the context factory implementation (com.sun.enterprise.naming.SerialInitContextFactory) was found and the 'irritating' error of NameNotFoundException or NoInitialContextException were sorted.
Besides, it is possible to specify just the no-args construction of InitalContext and the jar is capable of using its preferred ContextFactory.
Christophe, i shall use separate threads for my questions. My intention was to reuse the thread that was related. I have posted this answer to avoid leaving my query open. Sorry!