2 Replies Latest reply on Sep 3, 2013 1:36 PM by jayaveluv

    Tomcat/Liferay Infinispan configuration questions

    grubin

      My plan is to cluster a number of Tomcat/Liferay servers, one JVM for each machine, with Infinispan replicating Caches between machine (distribution or replication--haven'tdecided yet). For now I'm having problems developing on a single machine.

       

      I have three named caches that I want available to all server beans, but I think I have a configuration problem. My idea is to have what Liferay calls a PostStartupAction (it runs soon after Tomcat starts) initialize a cache manager and tell it the names of the three caches (thereby initializing three empty caches). Then my multiple webapps' beans will each get from and put to these three caches as needed.

       

      The problem is that if my beans are ViewScoped (probably anything less than SessionScoped), each new bean instance starts off with empty caches instead of add to or reading from the (desired global) caches.

       

      I thought I could name my cache manager, but the only place I see to assign a name is in <globalJmxStatistics />. This doesn't seem to be the answer, since it's meant to be used in monitoring.

       

      Can anyone tell me (from this crummy problem description) what I need to add? Here's my Infinispan xml file (so far):

       

       

      <infinispan>

          <global>

              <globalJmxStatistics enabled="true"

                  allowDuplicateDomains="false"

                  jmxDomain="org.infinispan"

                  cacheManagerName="PlumvoCacheManager"

              />

          </global>

       

          <default>

              <jmxStatistics enabled="true"/>

              <expiration

                  maxIdle="1200000"

                  wakeUpInterval="300000"

                  />

          </default>

       

          <namedCache name="hhlds-cache">

              <jmxStatistics enabled="true"/>

          </namedCache>

          <namedCache name="msgs-cache">

              <jmxStatistics enabled="true"/>

          </namedCache>

          <namedCache name="notifs-cache">

              <jmxStatistics enabled="true"/>

          </namedCache>

      </infinispan>

       

      Thank you.