This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes comparing RMI and EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "comparing RMI and EJB" Watch "comparing RMI and EJB" New topic

comparing RMI and EJB

Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
hai all,
In RMI we call a Remote Method using our server programme and serve our client.why cannot the same be done in EJB. why do we need a Home interface to get an object for Remote interface. why can't it be done directly.
Amol Takate

Joined: Sep 20, 2003
Posts: 15
What I know abt Home object is that :
Home Objects are introduced in EJB to have location transperency.
Home Objetcs are the factories of Remote objects, so that you can initialise a the beans in a different ways.
ahmad namini
Ranch Hand

Joined: Aug 29, 2002
Posts: 52
The EJB Home objects are not for location transparency, but rather a Factory for EJB Remote and Local Interfaces. This factory is implemented by the EJB container when returns the interface. The real beauty of the Home object is that the EJB container now controls the interception of client requests to the EJB and offers the client implicit middleware functionality (instance pooling, security, clustering, transactions, etc.)
So if choose not to use EJB's, you will need to provide all middleware services yourself. EJB's open standard and large vendor adoption makes it ideal for distributed systems.

-Ahmad<br />Sun Certified Java Developer (SCJD)<br />Sun Certified Java Programmer (SCJP)<p>"You got to be careful if you don't know where you're going, because you might not get there." -Yogi Berra
subject: comparing RMI and EJB
Similar Threads
How EJB works?
why we implement session bean or entity bean
why remote interface not implemented?
remote interface
PortableRemoteObject.narrow() - why?