• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to close a session

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have made a session using stateful session bean. Please tell me how to close the session when user logs out.
Thanks
Abhishek
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Handle the code in ejbRemove and make sure client calls remove before logging out. However if the client session expires, or the client loses the connection with the bean before calling remove, then you are still safe, because the container will first passivate the bean and later on will remove the bean calling ejbRemove anyway. As you can see you might not care about calling remove at all, but by doing so you give the container a hint that the SFSB could be discharged at any time.
Regards.
 
reply
    Bookmark Topic Watch Topic
  • New Topic