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

    Tomcat/Liferay Infinispan configuration questions

    Gerald Rubin Newbie

      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):





              <globalJmxStatistics enabled="true"








              <jmxStatistics enabled="true"/>







          <namedCache name="hhlds-cache">

              <jmxStatistics enabled="true"/>


          <namedCache name="msgs-cache">

              <jmxStatistics enabled="true"/>


          <namedCache name="notifs-cache">

              <jmxStatistics enabled="true"/>




      Thank you.