2 Replies Latest reply on Apr 25, 2018 1:04 PM by cora.kwok

    Wildfly12 set up high availability failed

    cora.kwok

      According to the example, most of the class are depreciated.

      I seek to use the example by using the following setup in standalone-ha-ejb.xml but failed to start up

       

           <subsystem xmlns="urn:jboss:domain:infinispan:5.0">

        <supplement name="default">

              <replacement placeholder="CACHE-CONTAINERS">

                  <cache-container name="server" default-cache="default" module="org.wildfly.clustering.server">

                      <local-cache name="default">

                          <transaction mode="BATCH"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">

                      <local-cache name="passivation">

                          <locking isolation="REPEATABLE_READ"/>

                          <transaction mode="BATCH"/>

                          <file-store passivation="true" purge="false"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">

                      <local-cache name="passivation">

                          <locking isolation="REPEATABLE_READ"/>

                          <transaction mode="BATCH"/>

                          <file-store passivation="true" purge="false"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="hibernate" module="org.infinispan.hibernate-cache">

                      <local-cache name="entity">

                          <transaction mode="NON_XA"/>

                          <object-memory size="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="local-query">

                          <object-memory size="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="timestamps"/>

                  </cache-container>

              </replacement>

          </supplement>

          <supplement name="ha">

              <replacement placeholder="CACHE-CONTAINERS">

                  <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">

                      <transport lock-timeout="60000"/>

                      <replicated-cache name="default">

                          <transaction mode="BATCH"/>

                      </replicated-cache>

                  </cache-container>

                  <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">

                      <transport lock-timeout="60000"/>

                      <distributed-cache name="dist">

                          <locking isolation="REPEATABLE_READ"/>

                          <transaction mode="BATCH"/>

                          <file-store/>

                      </distributed-cache>

                  </cache-container>

                  <cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan">

                      <transport lock-timeout="60000"/>

                      <distributed-cache name="dist">

                          <locking isolation="REPEATABLE_READ"/>

                          <transaction mode="BATCH"/>

                          <file-store/>

                      </distributed-cache>

                  </cache-container>

                  <cache-container name="hibernate" default-cache="local-query" module="org.infinispan.hibernate-cache">

                      <transport lock-timeout="60000"/>

                      <local-cache name="local-query">

                          <object-memory size="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <invalidation-cache name="entity">

                          <transaction mode="NON_XA"/>

                          <object-memory size="10000"/>

                          <expiration max-idle="100000"/>

                      </invalidation-cache>

                      <replicated-cache name="timestamps"/>

                  </cache-container>

              </replacement>

          </supplement>

          </subsystem>

        • 1. Re: Wildfly12 set up high availability failed
          rhusar

          Your configuration is just wrong, cannot even pass XML validation.

          <supplement name="default">

                  <replacement placeholder="CACHE-CONTAINERS">

          is used by the build process to generate configuration which you seem to have just copy pasted into your profile.

           

          Start from default WildFly 12-shipped HA profile and make changes as needed.

          • 2. Re: Wildfly12 set up high availability failed
            cora.kwok
            From the wildfly12 documentation, 
            the class using is 2.0, however, the version used should be 5.0
            Or otherwise failed to compile the standalon.xml
            <subsystem xmlns="urn:jboss:domain:infinispan:2.0"> <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server"> <transport lock-timeout="60000"/> <replicated-cache name="default" mode="SYNC" batching="true"> <locking isolation="REPEATABLE_READ"/> </replicated-cache> </cache-container> <cache-container name="web" aliases="standard-session-cache" default-cache="repl" module="org.wildfly.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" mode="ASYNC" batching="true" l1-lifespan="0"> <file-store/> </distributed-cache> </cache-container> <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl" module="org.jboss.as.clustering.ejb3.infinispan"> <transport lock-timeout="60000"/> <replicated-cache name="repl" mode="ASYNC" batching="true"> <eviction strategy="LRU" max-entries="10000"/> <file-store/> </replicated-cache> <!-- ~  Clustered cache used internally by EJB subsytem for managing the client-mapping(s) of ~                 the socketbinding referenced by the EJB remoting connector --> <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/> <distributed-cache name="dist" mode="ASYNC" batching="true" l1-lifespan="0"> <eviction strategy="LRU" max-entries="10000"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="hibernate" default-cache="local-query" module="org.hibernate"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <transaction mode="NONE"/> <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"> <transaction mode="NONE"/> <eviction strategy="NONE"/> </replicated-cache> </cache-container> </subsystem>