Session 在Tomcat 6中复制会话属性时出现问题
我已经为Tomcat 6配置了内存会话复制。我还通过isapi_重定向器使用IIS 7(我知道,我知道)和AJP连接器。集群工作正常,我能够使用示例war中的SessionExample复制会话属性。问题是我无法在自定义应用程序中执行相同的操作。我已经将可分发标记添加到测试集群中两台服务器上的web.xml文件中。但是,我在日志中没有看到任何提到将属性发送到集群的消息(我在SessionExample中看到它们)。我在我的应用程序中看到的唯一主要区别是示例:Session 在Tomcat 6中复制会话属性时出现问题,session,tomcat,session-replication,Session,Tomcat,Session Replication,我已经为Tomcat 6配置了内存会话复制。我还通过isapi_重定向器使用IIS 7(我知道,我知道)和AJP连接器。集群工作正常,我能够使用示例war中的SessionExample复制会话属性。问题是我无法在自定义应用程序中执行相同的操作。我已经将可分发标记添加到测试集群中两台服务器上的web.xml文件中。但是,我在日志中没有看到任何提到将属性发送到集群的消息(我在SessionExample中看到它们)。我在我的应用程序中看到的唯一主要区别是示例: 示例war使用Servlet2.5。
<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>
对不起。我发现了问题。我希望在日志中看到有关创建会话属性的消息。我没有意识到examples项目有一个会话侦听器将消息输出到日志。我认为这仅仅是从我设置的日志级别开始的 感谢所有读过这篇文章的人