4 Replies Latest reply on Nov 24, 2016 5:04 AM by Thom White

    Help with setting up a replicated Infinispan cache (domain mode)

    Kumar Lakshmipathi Newbie


      I am unable to get a replicated Infinispan cache working in domain mode with two managed servers.


      My setup (domain.xml & cache lookup below) results in two fully functional caches on each of the servers.


      1st call to Server#1: Cache MISS. Database read.

      2nd call to Server#1: Cache HIT.

      1st call to Server#2: Cache MISS. Database read.

      2nd call to Server#2: Cache HIT.


      If the cache replication had worked, I would have expected the 1st call to Server#2 to have a Cache HIT.


      SETUP (Wildly 10.1.0.Final on CentOS 7)


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


          <cache-container name="my-cache-container" module="org.wildfly.clustering.ejb.infinispan" statistics-enabled="true">

              <transport lock-timeout="60000"/>

              <replicated-cache name="my-cache" mode="SYNC">

                  <locking isolation="READ_COMMITTED"/>

                  <transaction mode="FULL_XA"/>

                   <eviction strategy="LRU" max-entries="10000"/>

                    <expiration max-idle="100000"/>





      Cache lookup in code:

      @Resource(lookup = "java:jboss/infinispan/cache/my-cache-container/my-cache")

          Cache<String, String> cache;


      My thinking right now is that there needs to be a connection set up between the servers(?)  Perhaps by adding a new outbound-connection to the remoting subsystem(?).  My google-fu has failed me so far,  am I on the right path??