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

Amit,

On 3/2/2009 4:21 PM, Amit Chandel wrote:
> But only issue is that Tomcat doesn't persist sessions to DB
> synchronously as is the case with in-memory replication where session
> data is first replicated and then the request gets served. So if
> master fails, and the session data has not been persisted, subsequent
> requests going to the other tomcat node will see old session data
> from DB, and might frustrate the *user*. I would like to know how
> synchronous persistance of session data with Tomcat is done in
> practice.

I have no experience with JDBCStore, but you could always implement your
own SessionManager that does synchronous database updates.

If you don't want to implement a SessionManager (which might be a bit
heavy-handed and certainly Tomcat-specific), you could also write a
filter that wraps the HttpSession with your own object that does
synchronous DB reads and writes. This might also save you a LOT of RAM.
If you use the database exclusively for session attribute data, your
in-memory footprint for sessions could drop dramatically.

If you'd like an example of such a filter, I could probably provide one.

- -chris

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

iEYEARECAAYFAkmsYPgACgkQ9CaO5/Lv0PBsWACfccJ6T9ZvIlRRhk65kpJ4BZc1
1ZoAniNvoh/NGQ5N1VnkGw5yr55S4hgN
=xPGx
-----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