会话复制在多节点集群上的 glassfish 中不起作用
1) 应用程序在 web.xml 中包含可分发标签
2) 应用程序部署在集群 c1 中(该集群包含同一节点上的 2 个实例)时,会话复制可以正常工作。
3) 当部署在集群 c2(包含两台 CentOS 计算机上存在 2 个实例)中的同一应用程序时,会话复制不起作用。
以下是 glassfish-web.xml 的内容(如果需要参考):
<glassfish-web-app error-url="">
<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="persistenceFrequency" value="web-method" />
<property name="relaxCacheVersionSemantics" value="true"/>
</manager-properties>
<store-properties>
<property name="persistenceScope" value="session" />
</store-properties>
</session-manager>
<!--<cookie-properties>
<property name="cookieDomain" value="node2"/>
<property name="cookieDomain" value="node4"/>
</cookie-properties> -->
<cache max-entries="4096" timeout-in-seconds="30" enabled="false">
<default-helper/>
</cache>
</session-config>
<context-root>/contextNaam</context-root>
<class-loader delegate="true"/>
<resource-ref>
<res-ref-name>jdbc/safe</res-ref-name>
<jndi-name>jdbc/safe</jndi-name>
</resource-ref>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
编辑:1)似乎不是两台 centos 机器之间的 UDP 通信问题。
2)也尝试按照HA管理指南中提到的方式创建tcp集群,但效果仍然相同,会话未在tcpcluster上复制。
Shoal 存在 bug,与 Grizzly 不兼容。我已在 Payara 中修复了该问题,现在 Glassfish 中也已修复该问题。
目前的状态是它似乎有效(Payara 4.1.1.154)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)