Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent Sessions with JDBC and Tomcat

We have a cluster of Tomcat servers that share a common web server running mod_jk. We currently use sticky sessions to take care of session handling, but we would like to move to JDBC session sharing. Does anyone have a good resource or step-by-step solution to deal with this?

I was not sure if this question was meant for stackoverflow, serverfault, or DBA, but here it is. :)

EDIT:

I think the content of my question must be confusing. The sessions to which I am referring are user sessions (JSESSIONID), not connections to the database. What I want to do is use the database to handle the user sessions so that when one server in the cluster goes down, the transition to another server is seamless to the user. Right now, the user is logged out when an error on the server occurs.

like image 251
Andy Avatar asked Mar 01 '11 17:03

Andy


1 Answers

Most of this is available in Tomcat documentation, see Persistent Manager Implementation.

You can also look at this.

like image 146
mindas Avatar answered Sep 28 '22 12:09

mindas