tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dion Almaer" <d...@almaer.com>
Subject HTTPSessions: sessionDestroyed(), attributeRemoved(), etc
Date Sat, 09 Mar 2002 00:45:18 GMT

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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message