Tomcat memecached session shared synchronization solution: tomcatmemecached
Event reason: a main project is "map to beautiful things", and a sub-function is the brand owner's entry function. It is a project separated from the main project. To share login user information, session sharing is realized, two tomcat servers, one tomcat 6 and the other tomcat 7
Share sessions in windows for web projects
Step 1:
Configure the following code in the context. xml file of the two tomcat servers:
<Manager className = "de. javakaffee. web. msm. MemcachedBackupSessionManager"
MemcachedNodes = "n1: 127.0.0.1: 11211"
LockingMode = "auto"
Sticky = "true"
RequestUriIgnorePattern = ". * \. (ico | png | gif | jpg | css | js) $"
SessionBackupAsync = "false"
SessionBackupTimeout = "100"
TranscoderFactoryClass = "de. javakaffee. web. msm. serializer. kryo. KryoTranscoderFactory"
CopyCollectionsForSerialization = "true"
/>
Step 2:
Jar packages added under Tomcat 6:
Jar packages added under Tomcat 7:
Jar is as follows: