handle of stateful session bean - experts only
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Saurabh_Paliwal
Posted On:   Sunday, April 29, 2001 06:55 AM

Hi All, We know that hadle of an EJB is nothing , but a means to obtain the remote reference to the EJB Object(i.e we can obtain the EJBObject stub, by invoking the getEJBObject() on the handle). My doubt is, whether in case of stateful sessi0on beans, this handle contains their state as well or not ??? If it doesn't contain the state, then what is the use of the handlw, we can directly serailize the remote reference and use it when needed,instead of obtaining the handle, then serializing it and obtaining the remote reference from the handle. (In my opinion handle containg the state of the stateful session bean doesn't make sense, but then question arises, if handle is only a pointer to remote object, why not serailize the remot   More>>

Hi All,
We know that hadle of an EJB is nothing , but a means to obtain the remote reference to the EJB Object(i.e we can obtain the EJBObject stub, by invoking the getEJBObject() on the handle).
My doubt is, whether in case of stateful sessi0on beans, this handle contains their state as well or not ???
If it doesn't contain the state, then what is the use of the handlw, we can directly serailize the remote reference and use it when needed,instead of obtaining the handle, then serializing it and obtaining the remote reference from the handle.

(In my opinion handle containg the state of the stateful session bean doesn't make sense, but then question arises, if handle is only a pointer to remote object, why not serailize the remote reference instead of handle)

Any help is appreciated.

Thanks in advance
Saurabh

   <<Less

Re: handle of stateful session bean - experts only

Posted By:   Michael_Wax  
Posted On:   Sunday, April 29, 2001 04:24 PM

Are you sure that the stub class that implements EJBObject is serializable? There is no guarantee in the EJB specification that this stub be serializable, and there is a good chance that it will not be. The Handle object, on the other hand, is guaranteed to be serializable, so you will be able to store it for later requests.


By the way, just as the Handle object does not contain state information, neither does the remote object: the state information resides only in the stateful session bean itself.

About | Sitemap | Contact