Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getHomeHandle

 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I couldnt understand the requirement of having handle for home interface in EJBs. As said in HFEJB, home interface will be alive forever on the server. In that case, why do anyone want to have a handle for home interface?


Thanks and Regards,
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this EJB Doc.

public HomeHandle getHomeHandle() throws java.rmi.RemoteException

Obtain a handle for the remote home object. The handle can be used at later time to re-obtain a reference to the remote home object, possibly in a different Java Virtual Machine.
 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean to say that the handle obtained for remote home interface can be shared by clients in different JVMs?

Thanks and Regards,
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, because it is serializable.
 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the potential benefits of sharing home handle with clients on other JVMs?

Thanks and Regards,
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could serialize it, send it by email, get it back from another machine, and continue to work with it. No need to do another lookup to get the home.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic