<?xml version="1.0" encoding="UTF-8"?>

<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:4.0">

   <!-- *************************** -->
   <!-- System-wide global settings -->
   <!-- *************************** -->

   <global>

      <!--
         If the transport is omitted, there is no way to create distributed or clustered caches.
         There is no added cost to defining a transport but not creating a cache that uses one, since the transport
         is created and initialized lazily.
      -->
      <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="infinispan-cluster"
                 distributedSyncTimeout="5000">
         <!-- Note that the JGroups transport uses sensible defaults if no configuration property is defined. -->
         <property name="configurationFile" value="tcp.xml"/>
         <!-- See the JGroupsTransport javadocs for more flags -->
      </transport>

   </global>

   <!-- *************************** -->
   <!-- Default "template" settings -->
   <!-- *************************** -->
   <!-- this is used as a "template" configuration for all caches in the system. -->
   <default>
      <!--
         isolation levels supported: READ_COMMITTED and REPEATABLE_READ
      -->
      <locking
            isolationLevel="REPEATABLE_READ"
            lockAcquisitionTimeout="20000"
            writeSkewCheck="false"
            concurrencyLevel="500"/>

      <!--
      Used to register a transaction manager and participate in ongoing transactions.
      -->
      <transaction
            transactionManagerLookupClass="org.infinispan.transaction.GenericTransactionManagerLookup"
            syncRollbackPhase="false"
            syncCommitPhase="false"/>

      <!--
         This element specifies that the cache is clustered.
         modes supported: replication (r) or invalidation (i).
      -->
      <clustering mode="replication">

         <!--
            Defines whether to retrieve state on startup
         -->
         <stateRetrieval timeout="20000" fetchInMemoryState="false"/>

         <!--
            Network calls are synchronous.
         -->
         <sync replTimeout="20000"/>
         <!--
            Uncomment this for async replication.
         -->
         <!--<async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500"/>-->
      </clustering>
   </default>

</infinispan>
