2013-09-16 8 views
2

두 개의 노드가있는 "도메인"클러스터에 JSF 웹 응용 프로그램을 배포하려고합니다.JBoss EAP 6.1의 HTTP 세션 복제

노드간에 복제 된 HTTP 세션을 가져올 수 없습니다.

내가 설정 한 내 web.xml을

<?xml version="1.0" encoding="UTF-8"?> 
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> 

    <session-config> 
     <session-timeout>30</session-timeout> 
    <tracking-mode>URL</tracking-mode> 
    </session-config> 

    <distributable></distributable> 

</web-app> 

의 jboss-web.xml을

<?xml version="1.0" encoding="UTF-8"?> 
<jboss-web> 
    <context-root>thumbzup-admin</context-root> 

    <!--replication-config> 
     <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-trigger> 
     <replication-granularity>SESSION</replication-granularity> 
    </replication-config--> 
    <replication-config> 
    <cache-name>custom-session-cache</cache-name> 
    <replication-trigger>SET</replication-trigger> 
    <replication-granularity>ATTRIBUTE</replication-granularity> 
    <!--replication-field-batch-mode>true</replication-field-batch-mode--> 
    <use-jk>false</use-jk> 
    <max-unreplicated-interval>30</max-unreplicated-interval> 
    <snapshot-mode>INSTANT</snapshot-mode> 
    <snapshot-interval>1000</snapshot-interval> 
    <replication-mode>SYNCHRONOUS</replication-mode> 
    <!--session-notification-policy>com.example.CustomSessionNotificationPolicy</session-notification-policy--> 
    </replication-config> 
</jboss-web> 

및 Infinispan 캐시 컨테이너 domain.xml의을에;

<cache-container name="web" aliases="standard-session-cache" default-cache="repl" module="org.jboss.as.clustering.web.infinispan"> 
        <transport lock-timeout="60000"/> 
        <replicated-cache name="repl" mode="ASYNC" batching="true"> 
         <file-store/> 
        </replicated-cache> 
        <replicated-cache name="sso" mode="SYNC" batching="true"/> 
        <distributed-cache name="dist" l1-lifespan="0" mode="ASYNC" batching="true"> 
         <file-store/> 
        </distributed-cache> 
       </cache-container> 

하지만 NODE2에서 동일한 SESSIONID를 사용하는 경우 NODE1에서 생성 된 세션을 검색 할 수 없습니다.

제안 사항?

답변

2

jboss-web.xml에 정의한 "custom-session-cache" 의 이름이 domain.xml 내의 캐시와 일치하지 않는 것 같습니다. "cache-name"속성을 완전히 제거하여 "웹"컨테이너의 "default-cache"속성 값을 사용하거나 해당 이름의 캐시 항목을 추가하십시오.