-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andrew,
Andrew Hole wrote: | Well, valueUnbound is executed on both TC. You mentioned that. The "valueUnbound" is being propagated from the TC instance shutting down across the cluster, right? I can't seem to get a straight answer to that question. | we are doing session replication, lets say we have a 5 (for example) node | cluster. When a user logs on, his/her session will be replicated on 5 | tomcats. When he/she logs out, you only want track that the user has logged | out once, not 5 times (our logout tracking is associated to valueunbound). | Actually, valueunbound is executed on all tomcats. Again, this seems consistent to me. The servlet specification suggests (S 7.7.2): " Application Developers writing distributed applications should be aware that since the container may run in more than one Java virtual machine, the developer cannot depend on static variables for storing an application state. They should store such states using an enterprise bean or a database. " Perhaps you could have your User object (in its valueUnbound method) mark the session as already having processed this event. Of course, bringing down one container in a cluster will have the effect of logging everyone out at once, even if they are on other servers as well. Having never run Tomcat under a clustered configuration, I can't say as I have too many suggestions for you... I usually store a user's state in a database instead of relying on the HttpSession for that kind of management. (And we don't attempt to log 'logout' events, which it looks like you might be attempting to do). I'm not sure how to tell the difference between a session going away due to an HttpSession.invalidate call versus some other mechanism (such as the "expire" method that you are encountering during shutdown). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfDMuQACgkQ9CaO5/Lv0PCABACgkRZIFUnCyh+53MbJy4rVLwUG 7c8An0A5DcUfxGDu6+ZFZCCKpy4P+ikh =PZqx -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]