tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject AW: How to keep track of sessions
Date Wed, 14 Aug 2002 13:09:00 GMT
See below

> -----Urspr√ľngliche Nachricht-----
> Von: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> Gesendet: Mittwoch, 14. August 2002 14:59
> An: Tomcat Users List
> Betreff: RE: How to keep track of sessions
> 
> Sessions are not meant to be persisted across server restarts.  
> 

Obviously other people have other opinions about that.

Session persistence is implemented in tomcat, if there 
would be no need that wouldn't exist :).

> - Have an object, MySessionInfoHolder, that holds the stuff you need
> about the session, for example some attributes.  You probably do *not*
> want to keep the session ID.
> 
> - Have a singleton, MySessionInfoManager, that keeps a set (no
> duplicates) of these MySessionInfoManager objects.
> 
> - Your session listener (either a Session or a SessionAttribute
> listener, or both) would extract the proper info from a 
> Jakarta session object and store it in the manager.

That was not the problem, this part works. It's the vector of 
sessions that is missing as it is stored ouside the session.
So your next paragraph is a possible solution.

> 
> - On context shutdown, persist the stuff in MySessionInfoManager using
> castor (or any of the other similar packages) or your own 
> serialization
> / XML / JDBC / whatever mechanism.
> 
> - On context startup, recall the stuff from XML / the database /
> wherever into the manager.
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message