aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJBHandle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJBHandle" Watch "EJBHandle" New topic
Author

EJBHandle

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
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

Joined: Feb 27, 2002
Posts: 8919

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.


Groovy
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
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

Joined: Jan 09, 2003
Posts: 182
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

Joined: Feb 27, 2002
Posts: 8919

It will contain enough info so that EJBObject can be created later on the server.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJBHandle