tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Way to cleanup *before* session terminates ?
Date Thu, 31 Jul 2003 08:17:30 GMT
Sorry Charlie (ok, I couldn't resist :), but there isn't a way to do this in
Tomcat 4.x and lower.  However, the (current draft of the)  2.4 Servlet-Spec
has changed the behavior, and so in Tomcat 5.x you can define a
HttpSessionListener that will get called before the session is invalidated.

"Charlie Toohey" <ctoohey@pacbell.net> wrote in message
news:E19hzAt-0004vt-00@main.gmane.org...
> I have been looking for a way to execute some code when a session is
> terminating due to invalidation or expiration, but before the session has
> actually been terminated.
>
> I know that implementing HttpSessionBindingListener and binding my object
> into the session will allow me to execute code in my valueUnbound method,
but
> the notifcation is sent after the session has been invalidatd or expired.
>
> But is there any way to be notified that the session is about to terminate
> before it actually has been invalidated or expired ?
>
> - Charlie




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message