File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between local object and remote object in EJB 2.0

 
shiva kumarp
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17625
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic