This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

difference between local object and remote object in EJB 2.0

 
Greenhorn
Posts: 3
  • 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.
------------------
 
Saloon Keeper
Posts: 22248
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • 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.
 
Ranch Hand
Posts: 977
  • 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.
 
pie. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic