Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateful session bean persistence

 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I ask me the following question: a stateful session bean keeps conversational state between the same client method invocations.
But what if I loose the session, for example by closing the window: is there a way for the client to retrieve this stateful bean?
Or for the session bean to retrieve a specified client? I know that with the help of SessionContext interface, we can get some information about client security, but that's not enough: we may know that this client belongs to this specified logic role, but we don't get reference to the client...
For me, it's not possible but i'm perhaps wrong...
I would be very grateful for any assitance!
Regards,
Cyril.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about serializing the handle of the remote interface and re-using it later from the client side?
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Vish,
Thanks for the answer.
Indeed, I forgot this method getHandle() from EJBObject.
It seems to be what I need.
Thanks,
Regards,
Cyril.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!