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

Handle and HomeHandle

 
Salman Riaz
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was looking at EJB API and came across Handle and HomeHandle interfaces, Could some please explain it as i could make any sense of this description provided in javadoc.

I do understand it is used as container contract to the ejb object, and used by the EJB container only.

Handle and HomeHandle:
"A handle is intended to be used as a "robust" persistent reference to an EJB object"

Many Thanks in Advance!

Regards
Salman
 
Balaji VR
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your understanding of Handle that is used only by the EJB container is WRONG!!!

"A handle is intended to be used as a "robust" persistent reference to an EJB object" <---- What does this mean?

It means that, once you get an handle to the EKB Object/Home, you can persist them (ata your client side). Later, you can make use of that persisted handle and make calls to your EJB objects/Home whenever you need to.

Refer to page no 65 in EJb spec to see how.

More
----
".........interface. The home handle can be serialized and written
to stable storage. Later, possibly in a different JVM, the handle can be deserialized from stable
storage and used to obtain back a reference of the remote home interface...." <-- From EJB spec page no 59.

Jappy Learning!
 
Salman Riaz
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Balaji,
This Helps, i didn't refer specs before putting this question.

Salman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic