tomcat 采用msm连接memcached缓存session

在context中添加
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"  
		memcachedNodes="n1:localhost:11211"  
		requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$"  
		sessionBackupAsync="false"  
		sessionBackupTimeout="100"  
		transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"  
		copyCollectionsForSerialization="false"
 />

memcachedNodes 多个节点之间可以用空格分开,如n1:localhost:11211 n2:localhost:11212

msm要用的包有:
  javolution-5.4.3.1.jar
  memcached-2.5.jar
  memcached-session-manager-1.3.0.jar
  msm-javolution-serializer-1.3.0.jar
  msm-javolution-serializer-cglib-1.3.0.jar
  msm-javolution-serializer-jodatime-1.3.0.jar
 
将这些包考到tomcat的lib下即可

你可能感兴趣的:(tomcat,xml,memcached)