WildFly Infinispan Subsystem Configuration

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Subjects

Overview


This section refers to configuring the internal WildFly caches. For details on how to setup a JDG cluster, see Infinispan Configuration.

Default

EAP 6.4

<subsystem xmlns="urn:jboss:domain:infinispan:1.5">
        <cache-container name="singleton" aliases="cluster ha-partition" default-cache="default">
            <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.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" 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.jboss.as.jpa.hibernate:4">
            <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>

HTTP Session Replication Cache

WildFly Infinispan HTTP Session Replication Configuration

Organizatorium

Caches Do Not Start at Boot Even if Declared Eager

TODO: Did not work - I only started clustering if I deployed a distributable servlet. Investigate why. Then link from WildFly Clustering without Multicast#Why_Doesn.27t_the_Cluster_Form.3F to the final explanation header.

If the servers are not specifically configured to eagerly start the caches, JGroups channels are not initialized at boot, so the cluster does not form, unless an application specifically requires clustering.

In order to eagerly start the cache:

/profile=ha/subsystem=infinispan/cache-container=web:write-attribute(name=start,value=eager)