Invalidated session does not call HttpSessionListener sessionDestroyed method
Posted on 2004-03-31
I've got the following problem:
In my web application a user has to login with username + password. After a successful login I insert a record in a database.
When the user logs out of the application the user Session is invalidated. In my implementation of HttpSessionListener I update the created database record by filling in a logout timestamp.
This mechanism works perfect in Tomcat 4.0.3 running on Win NT.
When I deploy my code to a Linux machine running Tomcat 4.0.3 and 4.0.6 the following happens:
The first time after a tomcat restart that a user logs in and out the record is created and updated.
The second time however a record is created at login time, but not updated at logout time! Only after 30 minutes (when the session expires) the record is updated with the logout timestamp of that moment.????
Can someone tell me what is happening and may be how I can solve this?
Since the code on both machine is exactly the same I assume it must have something to do with TOmcat configuration or proxies or something.