You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Software AG <sa...@stark-verlag.de> on 2002/06/24 13:25:03 UTC

SessionListener does not get enough information

Hi there.

I have a web application that stores some information into a database.
Now if the "transaction" is not complete (which means the user did not go
through a page asking "do you want to save [y/n]?") all stored data shall be
dropped again. I detect this "dropped transaction" with a SessionListener,
since after some time all inactive sessions are discarded.

The problem is now that when the SessionListener.sessionDestroyed method is
called, all attributed have already been removed from the session, so I do
not really know what data needs to be deleted.

In my eyes the real solution is to change the code in
StandardSession.expire() to first fire the event and then clear the
attributes. But I do not want to rely on anyone installing that web
application to have a modified version of Tomcat.

Does anyone know about an elegant workaround for this problem?

Hiran

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>