• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBHandle

 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WHat is the use of EJBHandle its advantages and disadvantages.
Can i have some links on more info on EJBHandle
Regards,
aakash
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBHandle is persistent reference to EJB reference.
A program store the EJBHandle in some secondary storage and use it later to connect to the EJB reference using the handle.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, an EJBObject is not guranteed to be Serializable, whereas an EJBHandle is Serializable. So any place that you need a Serializable reference to an EJB then you will need to use the EJBHandle. Typical example of this is storing a reference to a Stateful Session Bean in the HttpSession.
 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information.
What does EJBHandle stores. Does it store a referenece of the EJBObject or the value.
If it stores the ref and i deserialize the EJBHandle at later will it able to find the EJBObject.
and how this will work in clustered environment
Regards,
aakash
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will contain enough info so that EJBObject can be created later on the server.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Mathews:
Basically, an EJBObject is not guranteed to be Serializable, whereas an EJBHandle is Serializable.

Why ? You mean to say that the stub is not serializable , if it isn't how it get dowloaded across the network?
I haven't found a perfect answer to this question. Can some one give me the answer.
Thanks
[ August 05, 2003: Message edited by: Pradeep Bhat ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic