-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 8/7/2009 3:06 PM, Mark Thomas wrote:
> David Wall wrote:
>
>> My first attempt was to implement those two methods in my class that
>> already implements HttpSessionListener, but these methods were never
>> called.  On closer reading, it appears that this is an interface to be
>> implemented by an object that I then store in the session attributes. 
>> Do I create an object that implements HttpSessionActivationListener,
>> store that in all sessions so on restart Tomcat will then notify those
>> objects that they have been activated so I can then store the session
>> info in my list?
> 
> Short of delving into the Tomcat internals, I think that is your only
> option.

... which shouldn't be too difficult, given that the OP already has an
HttpSessionListener. It can just stuff itself into every session when it
gets created, and then it will be notified whenever a session is
activated. This actually seems like a reasonably elegant solution.

To David: There's always JMX if you don't want to maintain the list of
sessions yourself. Look at

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkp8gs4ACgkQ9CaO5/Lv0PBkXwCdGbZkwxBdbje5hqkXF/hOe9Ko
ObgAniKE97zCOgp6KUWvlZojV+sJaIdJ
=IWEZ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to