File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How Do I know when a session times out--cleanup? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How Do I know when a session times out--cleanup?" Watch "How Do I know when a session times out--cleanup?" New topic
Author

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

Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
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

Joined: Oct 12, 2002
Posts: 11
Max,
See if javax.servlet.http.HttpSessionBindingListener is what you want.
[ December 04, 2002: Message edited by: Nick_F ]
Asher Tarnopolski
Ranch Hand

Joined: Jul 28, 2001
Posts: 260
you can also use HttpSessionActivationListener with its sessionWillPassivate...


Asher Tarnopolski
SCJP,SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How Do I know when a session times out--cleanup?
 
Similar Threads
How to know the sessionID is alive ?
Cannot Find Bean in Scope Request
select a row
Session
Session handling