You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dion Almaer <di...@almaer.com> on 2002/03/09 01:45:18 UTC

HTTPSessions: sessionDestroyed(), attributeRemoved(), etc

Hi guys -

I am trying to write some code that listens to HTTPSessions, and when the server is going to destroy
it, I want to do something with it first.  sessionDestroyed() seems to be called AFTER the session is destroyed,
and as soon as one attribute is removed due to invalidation, the session can't be accessed (IllegalStateException is thrown saying
that the session is already invalidated).

What is the best way to do this?  Would it be better to have a Map where I add objects, and add that Map to the session,
and then have the Map implement HttpSessionBindingListener.valueUnbound() and get the attributes that way?

Cheers,

Dion

--
         \\|//
         (o o)
+----oOOo-(_)-oOOo--------------------------------------------------+
|   dion@almaer.com   | "Dew knot trussed yore spell chequer two    |
| www.almaer.com/dion |  fined awl yore mistakes"                   |
+-------------------------------------------------------------------+


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>