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

How Handle can retrive the same EJBObject reference after persistance

 
Bunty
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

From HFEJB I have read that Handle (from Handle getHandle() of EJBObject) method can be used to retrive the stub of the same EJBObject(may be different instance)when it is deserialsed after some time. But let us take a scenario. We can take a scenario like today we used a Shooping cart EJBOjbect( for a stateful session bean) to add a stuff to cart. Then due to some reason client serialise it. and after a quite considerable time(less than sessiom timeout and in different JVM instatnce) Client again deserialize the Handle to get the EJBObject( with the same security information as previous).

So my question is that if we are using a different JVM. So how a Handle instance come to know that the client want the reference to same EJBObject as previous. does the Handle object store some information regarding that and if yes what exactly is store in the Handle object

Please help me understanding that, unable to figure it out


Thanks in advance
 
Rajan Murugan
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bunty:
Hi

From HFEJB I have read that Handle (from Handle getHandle() of EJBObject) method can be used to retrive the stub of the same EJBObject(may be different instance)when it is deserialsed after some time. But let us take a scenario. We can take a scenario like today we used a Shooping cart EJBOjbect( for a stateful session bean) to add a stuff to cart. Then due to some reason client serialise it. and after a quite considerable time(less than sessiom timeout and in different JVM instatnce) Client again deserialize the Handle to get the EJBObject( with the same security information as previous).

So my question is that if we are using a different JVM. So how a Handle instance come to know that the client want the reference to same EJBObject as previous. does the Handle object store some information regarding that and if yes what exactly is store in the Handle object

Please help me understanding that, unable to figure it out


Thanks in advance


In handle interface you have a method getEJBObject() that returns EJBObject.
you are saying...

"...We can take a scenario like today we used a Shooping cart EJBOjbect( for a stateful session bean) to add a stuff to cart. Then due to some reason client serialise it...."

The client serialises the handle and not the EJBObject or shoping cart.
Here a different JVM we are talking about is at the client side and not at the server side.

ok
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic