2 Replies Latest reply on Feb 29, 2012 10:09 AM by earnest.dyke

    Custom CacheLoader configuration help

    earnest.dyke

      Greetings all,

       

      We are in the process of designing a new environment for our customer facing web application. We are planning to use JBoss AS 7 with Infinispan as the data interchange mechanism.

       

      To this end I am trying to develop a custom cacheloader (not a cachestore since the data is read-only) but am having issues with how all of the config stuff works together. Basicly what I am trying to do it use a config file like this:

       

       

      <namedCache name="MasterCustomerCache">
        <eviction strategy="LIRS" maxEntries="10" />
        <expiration lifespan="60000" maxIdle="60000"/>
        <loaders passivation="false" preload="false" shared="false">
          <loader class="com.my.cacheloader.MasterCustomerCacheLoader" esbUrl="http://localhost:8080/CatB4Login/http/masterCustomer">
          </loader>
        </loader>
      </namedCache>
      

       

      To create a cache entry, I need (I think) to create a MortalCacehEntry but that requires knowing the lifespan. I cannot figure out how to get the lifespan from the XML config file into my cacheloader.

       

      Any all all relevant responses are appreciated.

       

      Earnie!