Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Do I know when a session times out--cleanup?

 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using servlet 2.2 (Websphere 4) I need to detect when a user session dies so I can clean up resources (a lock table entry in this case)...
Do I use a session listener? Can I somehow override the finalize emthod in the session?
thanks,
Max Tomlinson
 
Nick Faiz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Max,
See if javax.servlet.http.HttpSessionBindingListener is what you want.
[ December 04, 2002: Message edited by: Nick_F ]
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can also use HttpSessionActivationListener with its sessionWillPassivate...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic