tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Enkelmann" <>
Subject R: how to know when an http session is destroyed
Date Thu, 13 Apr 2000 15:58:06 GMT

i just started to look at this feature, try to add something like the code
below to your bean.
In the valueUnbound method you can do any cleanup you need, like
disconnecting from a db.


import javax.servlet.*;
import javax.servlet.http.*;

public class WorkerBean
	implements HttpSessionBindingListener


	// HttpSessionBindingListener interface methods
	// we implement this to clean up an eventually started jdbc transaction
 	public void valueBound(HttpSessionBindingEvent event) {
		System.err.println("Protocol: i am bound to " +event.getName());

	// ???
 	public void valueUnbound(HttpSessionBindingEvent event)  {
		System.err.println("Protocol: i am freed from " +event.getName());
-----Messaggio originale-----
Da: GOMEZ Henri []
Inviato: giovedì 13 aprile 2000 16.19
Oggetto: how to know when an http session is destroyed


Is there a way to know when the servlet engine destroy an http session
(when it fall in timeout for example)


Henri Gomez                  ___[_]____
EMAIL :         (. .)
PGP KEY : 697ECEDD     ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF81EA8ED532F39DC9B904A364F80E6

To unsubscribe, email:
For additional commmands, email:

View raw message