aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes difference between local object and remote object in EJB 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "difference between local object and remote object in EJB 2.0" Watch "difference between local object and remote object in EJB 2.0" New topic
Author

difference between local object and remote object in EJB 2.0

shiva kumarp
Greenhorn

Joined: Aug 26, 2001
Posts: 3
what actually is the difference between local object and remote object in EJB 2.0 ?.As i find that we have ot extend javax.ejb.EJBLocalObject ,if our object has to be local object and we have to extend javax.ejb.EJBObject ,if our object has to be a remote object.
------------------
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16055
    
  21

A local object allows more efficient operation within a system because it bypasses the need for RMI communications since it is in the same JVM as its invoker and can thus be called directly.
EJB2.0 is supposed to support dual-role beans, where both a local and a remote interface are present in the same bean for maximum flexibility.


Customer surveys are for companies who didn't pay proper attention to begin with.
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,
remote:
The remote client view of an enterprise bean is location independent. A client running in the same JVM
as a bean instance uses the same API to access the bean as a client running in a different JVM on the
same or different machine.
A remote client can be another enterprise bean deployed in the same or different Container; or a remote
client can be an arbitrary Java program, such as an application, applet, or servlet. The remote client view
can also be mapped to non-Java client environments, such as CORBA clients not written in the Java programming
language.
local:
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 of a session bean or an entity bean may be another enterprise bean (a session bean, entity
bean, or message-driven bean).
regds.
 
jQuery in Action, 2nd edition
 
subject: difference between local object and remote object in EJB 2.0