Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateful bean doubt  RSS feed

 
Geeta Ramasami
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Suppose i'm using stateful session bean and i want my client to use the same EjbObject which got created for the first time i can put the ejbobject in a session..
So the subsequent call to client will not create new ejbobjects and would use the object present in the session.My doubt lies in, if the same bean instance would be used by the container.In the case of stateful bean, it maintains the state and as a result of it, even if the instance is not used for a long time, the state of the is copied to the secondary storage and if later used would take a bean instance and restore the state.Will the containerl restores the state and the value of the instance varaiable is maintained throughout the client session.?
Cheers
Geeta
 
Manish Kamat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in that case state will be restored as it's a stateful bean but you won't be able to access ejbobject stored in a session as session is expired
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!