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

Andrew,

Andrew Hole wrote:
> But, what happens to active [HTTP] sessions? I will lose all
> information associated to the active sessions?

Of course. Since Tomcat is managing the session in memory, and Tomcat
dies, the memory is released and its contents are lost.

If you want session "failover", you basically have to do it pre hoc:
that means arranging for the session data to be somewhere else /before/
the server dies.

You can have Tomcat manage this itself by using the built-in (but not
automatically enabled) session replication to essentially keep all
session information for all sessions in your cluster shared by /all/
servers in the cluster (so when one fails, you can switch physical
servers and keep the same session). I don't favor this option because it
puts quite a strain on all of your servers to support a situation which
(hopefully!) rarely happens.

You can write your own session management code to store the session
information in some shared storage area -- like a relational database. I
don't favor this approach for the same reason above, but also because
cleanup of such a data store is problematic as you might never know when
it's appropriate to delete the data from the data store.

Finally, you can make changes to your application such that a single
machine failure requires nothing but re-authenticating with a new server
and picks up where the user left-off. This may require a lot of changes
depending on how complex your application is. It is, however, the
technique I recommend.

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

iD8DBQFG6xCw9CaO5/Lv0PARAj7qAJwJbc6nOjka8wAFiNcDfGS9tQj/jwCfY4JI
hF8xa7n/GZAwYEHoJyjQQko=
=Z8pf
-----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]

Reply via email to