wood burning stoves
The moose likes EJB and other Java EE Technologies and the fly likes Home/Remote/EJB 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 "Home/Remote/EJB" Watch "Home/Remote/EJB" New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
A client can access EJB thru EJBObject. The EJBObject must know every business method associated w/ EJB thru remote interface. Again, client can�t instantiate an EJBObject directly because EJBObjects could exist on a different machine than the client resides. The client acquires reference to an EJBObject thru HomeObject. The HomeObject implements the home interface, which defines for creating , destroying, and finding EJB objects.
Above is my abstraction from the ED ROMAN book. Kindly answer my following questions.
1. Is that true that EJB, EJBObject and HomeObject may reside in different container ?.
My comments: HomeObject(EJBObject factory) can locate the EJBObject since it may reside in different m/c. How does the client locate HomeObject in case it resides in other m/c ?
2. I really don�t understand the requirement of HomeObject since all the business methods are available
EJBObject(which implements remote interface). Utlimately we need instance of EJB; why we can�t achieve it from the EJBObject itself instead of going thru HomeObject ?
Kindly help me out to understand. Thanks
srinivas acharyulu

Joined: Aug 03, 2000
Posts: 19
1. Yah. EJBObject and EJB Home can reside on different servers.
That's where u r utilising the full capability of EJB.
2.EJBHome is for maintaining the lifecycle of an Enetrprise Bean. It does all the functionality of find , lookup for the bean.There is no meaning non existing of HOME object.

D.Srinivas Acharyulu<BR>SystemsEngineer,<BR>WIPRO Technologies,<BR>Hyderabad,India
I agree. Here's the link: http://aspose.com/file-tools
subject: Home/Remote/EJB
It's not a secret anymore!