• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Handle and HomeHandle

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Balaji,
This Helps, i didn't refer specs before putting this question.

Salman
 
Do not threaten THIS beaver! Not even with this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic