Hi sven, great to see you around.
Unlike the remote client view, the local client view of a bean is not location independent. Access to an
enterprise bean through the local client view requires the collocation in the same JVM of both the local
client and the enterprise bean that provides the local client view. The local client view therefore does not
provide the location transparency provided by the remote client view.
A local client accesses a session or an entity bean through the bean�s local interface and local home
interface. The container provides
classes that implement the bean�s local and local home interfaces. The
objects that implement the local home interface and local interface are local
Java objects.
ex:
remote:
public interface CartHome extends javax.ejb.EJBHome
local:
public interface CartHome extends javax.ejb.EJBLocalHome
remote client:
Context initialContext = new InitialContext();
CartHome cartHome = (CartHome)javax.rmi.PortableRemoteObject.narrow(
initialContext.lookup(�java:comp/env/ejb/cart�),
CartHome.class);
If CartHome were a local home interface instead of a remote home interface, this lookup might be as
follows:
Context initialContext = new InitialContext();
CartHome cartHome = (CartHome)
initialContext.lookup(�java:comp/env/ejb/cart�);
You can find a lot more information about it at chapter 5 and 6 from the EJB2.0 specification.
regards.
[This message has been edited by Marcos Maia (edited August 22, 2001).]