1,在tomcat中找到文件apache-tomcat-6.0.37\conf\context.xml 加入内部
sessionBackupAsync="false"
sessionBackupTimeout="100"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
copyCollectionsForSerialization="false"
/>
加入之后的content.xml的内容为
WEB-INF/web.xml
sessionBackupAsync="false"
sessionBackupTimeout="100"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
copyCollectionsForSerialization="false"
/>
memcachedNodes 多个节点之间可以用空格分开,如n1:localhost:11211 n2:localhost:11212
我memcached的机子是安装在192.168.1.65 而且只配置一台
把下面对应的jar包复制到apache-tomcat-6.0.37\lib即可
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
1