简体   繁体   中英

Session replication in Tomcat - jdbc session persistence - custom or library implementation?

I'm implementing a multi-server Tomcat cluster web application (20+ servers). I want to do session replication by persisting the session to a common database via jdbc.

Is it worth my while to roll my own jdbc session persistence - or is there a strong and generic enough session replication implementation off the shelf in open source libraries?

The assumption here is that I'm looking for a "manager" that manages the persistence (to file or DB) of implementations of the following:

javax.servlet.http.Session
javax.servlet.http.SessionContext

Take a look at this: http://www.intelligrape.com/blog/2010/07/21/tomcat-6-session-persistence-through-jdbcstore/ .

I'm trying to do the same thing as you, I found that this works. However, I experience a delay on the DB session insert. If you use that solution and found an answer to it let me know.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM