我已经将Tomcat 6配置为内存中的会话复制。我还通过isapi_redirector使用IIS 7(我知道,我知道)和AJP连接器。集群正常工作,我能够在示例war中使用SessionExample复制会话属性。问题是我无法在我的自定义应用程序中做同样的事情。我已经将可分发标记添加到测试集群中两个服务器上的web.xml文件中。但是,我在日志中没有看到任何提到发送给集群的属性的消息(我在SessionExample中看到了这些属性)。在我的应用程序中,我能从示例中看到的唯一主要区别是:
另外,在应用程序的代码中,我在属性中设置了一个简单的字符串,所以没有什么特别之处。
所以,我想知道有没有人有办法让这件事发挥作用?
谢谢
下面是我的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>发布于 2014-01-21 02:40:34
抱歉的。我发现了问题。我希望在日志中看到有关创建会话属性的消息。我没有意识到示例项目有一个会话侦听器,它将消息输出到日志中。我在想,这仅仅是我设定的日志水平。
感谢读过这篇文章的人。
https://stackoverflow.com/questions/21213421
复制相似问题