我已经为 Tomcat 6 配置了内存会话复制。我还通过 isapi_redirector 使用 IIS 7(我知道,我知道)和 AJP 连接器。集群工作正常,我可以使用示例战争中的 SessionExample 复制会话属性。问题是我无法在我的自定义应用程序中做同样的事情。我已将可分发标签添加到测试集群中两台服务器上的 web.xml 文件中。但是,我在日志中没有看到任何消息提到发送到集群的属性(我在 SessionExample 中看到它们)。从示例中我可以在我的应用程序中看到的唯一主要区别:
- 示例战争使用 servlet 2.5。我仍然需要使用 2.4。
- 我的应用程序使用 SSO 并要求用户登录。
- 该应用程序是一个门户应用程序。
另外,在应用程序的代码中,我在属性中设置了一个简单的字符串,所以没什么特别的。
所以,我想知道是否有人有一些提示可以让这个工作?
谢谢
这是我的 server.xml 中的集群部分:
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.104"
port="45564"
frequency="500"
dropTime="10000"/>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto"
port="4000"
autoBind="100"
selectorTimeout="7000"
maxThreads="6"
timeout="15000"/>
<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
timeout="70000"/>
</Sender>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="/apache-tomcat-6.0.37/war-deploy/war-temp/"
deployDir="/apache-tomcat-6.0.37/webapps/"
watchDir="/apache-tomcat-6.0.37/war-deploy/war-listen/"
watchEnabled="true"/>
<ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>