Hi Martin, very interesting, thanks for share it!!! I did, more or less, the same on a project for a customer, but it was strictly related to the application, your stuff looks much much better of mine and it is a reusable module. All the best, Simo
http://people.apache.org/~simonetripodi/ On Tue, Feb 16, 2010 at 6:02 PM, Martin Grotzke <martin.grot...@javakaffee.de> wrote: > Hi Jon, > > On Mon, 2010-02-15 at 11:55 -0600, Jon Brisbin wrote: >> I'm trying to figure out today how I can implement a Valve or something that >> can store a session to a backend DB and reload that session on another >> Tomcat instance similar to how the PersistentManager loads user's session >> after a restart. >> >> Would a Valve based on PersistentValve allow me to implement a cluster-like >> solution such that a user login causes a write to a central database and a >> load balanced request to another server would see that user without forcing >> another login? > You might have a look at the > http://code.google.com/p/memcached-session-manager/ which is a session > failover solution storing sessions in memcached. > > When the project was created I only thought of applications using sticky > sessions but it should also work with non-sticky sessions if sessions > are stored in memcached synchronously (sessionBackupAsync needs to be > set to false, see [1]). > > The memcached-session-manager basically is a session manager > implemention, the most interesting part is the > MemcachedBackupSessionManager ([2]) if you want to have a look at the > code. > > Cheers, > Martin > > > [1] > http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration > [2] > http://github.com/magro/memcached-session-manager/blob/master/core/src/main/java/de/javakaffee/web/msm/MemcachedBackupSessionManager.java > > > >> >> Jon Brisbin >> Portal Webmaster >> NPC International, Inc. >> >> >> >> On Feb 15, 2010, at 11:05 AM, Simone Tripodi wrote: >> >> > Hi all guys and very nice to meet the Tomcat community, >> > I've a web-application that needs to be replicated in more than one >> > Tomcat, and since it is HttpSession based, I need to enable the >> > session replication. >> > Even if I work with very good sysadmins that know how to do it, I'm >> > curious and would like to know if I could replace the HttpSession >> > implementation with a my own one, I'd like to integrate Hazelcast[1] >> > for data synchronization. >> > Thanks in advance, every suggestion will be very appreciated. >> > Simo >> > >> > [1] http://www.hazelcast.com/ >> > >> > http://people.apache.org/~simonetripodi/ >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> > For additional commands, e-mail: users-h...@tomcat.apache.org >> > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > -- > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org