JBoss / WildFly中的会话故障转移

时间:2015-11-20 10:34:11

标签: session wildfly session-replication

设定:

  • 两台Linux机器
  • 以独立模式启动服务器
  • 使用的配置是standalone-full-ha.xml
  • cluster-demo.war部署到带有标记
  • 的两个节点

在两个节点之间成功形成群集。我可以看到jgroups消息并正确更新其集群视图。

方案:

  
      
  • 致电node1/cluster-demo/put.jsp
  •   
  • 致电node1/cluster-demo/get.jsp(会议生活)
  •   
  • 重新启动node1。会话持续
  •   
  • 致电node2/cluster-demo/get.jsp
  •   
  • 会话为空(为什么?)
  •   
     <subsystem xmlns="urn:jboss:domain:infinispan:3.0">
        <cache-container name="server" default-cache="default" module="org.wildfly.clustering.server" aliases="singleton cluster">
            <transport lock-timeout="60000"/>
            <distributed-cache name="default" mode="SYNC">
                <transaction mode="BATCH"/>
            </distributed-cache>
        </cache-container>
        <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
            <transport lock-timeout="60000"/>
            <distributed-cache name="dist" mode="ASYNC" owners="2" l1-lifespan="0">
                <locking isolation="REPEATABLE_READ"/>
                <transaction mode="BATCH"/>
                <file-store/>
            </distributed-cache>
        </cache-container>
        <cache-container name="ejb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan" aliases="sfsb">
            <transport lock-timeout="60000"/>
            <distributed-cache name="dist" mode="ASYNC" owners="2" l1-lifespan="0">
                <locking isolation="REPEATABLE_READ"/>
                <transaction mode="BATCH"/>
                <file-store/>
            </distributed-cache>
        </cache-container>
        <cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan">
            <transport lock-timeout="60000"/>
            <local-cache name="local-query">
                <eviction strategy="LRU" max-entries="10000"/>
                <expiration max-idle="100000"/>
            </local-cache>
            <invalidation-cache name="entity" mode="SYNC">
                <transaction mode="NON_XA"/>
                <eviction strategy="LRU" max-entries="10000"/>
                <expiration max-idle="100000"/>
            </invalidation-cache>
            <replicated-cache name="timestamps" mode="ASYNC"/>
        </cache-container>
    </subsystem>

0 个答案:

没有答案