Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Home/Remote/EJB

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic