6 Replies Latest reply on Mar 13, 2012 6:58 PM by mmogley

    CacheLoader defined in XML not being created


      I have a strange issue.  I'm trying to bootstrap Infinispan from an external xml file using Spring. as follows:







      My configuration:






          urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd




          <transport clusterName="infinispan-ws">


              <property name="configurationFile" value="jgroups_mcast.xml"/>






          <loaders preload="true" shared="false">

            <loader class="PerstCacheStore"






                <property name="flushInterval" value="10000" />

                <property name="location" value="${java.io.tmpdir}/infinispan" />

                <property name="lockAcquistionTimeout" value="600000" />

                <property name="pagePoolSize" value="16000000" />





          <storeAsBinary />            



        <namedCache name="testCache">

          <clustering mode="replication">

            <stateRetrieval fetchInMemoryState="true"/>




          <expiration lifespan="300000" wakeUpInterval="5000"/>


          <eviction maxEntries="100" strategy="LRU"/>  




      This works without any apparent errors. However, the resulting InfinispanConfiguration - on inspection in debug mode - has no loader defined.


      I've paired down the configuration to just show the relevant details.  PerstCacheStore is a custom cache store I wrote to integrate with Perst.  As I said, there are no errors on startup, and I'm able to store and retrieve data from the cache (and replication is working).  However, no cache entries are being persisted.  Could this be related to the fact that the Spring provider is attempting to unmarshal the xml using JAXB?  I've read that this has been deprecated and Infinispan 5.1 now uses stax-based parsing.


      In my debugging, I noticed that the resulting CacheLoaderManagerConfig does seem to represent the 'loaders' element ('preload' is set to true), but its 'cacheLoaderConfigs' list property remains empty


      My environment:


      - Infinispan 5.2.0, latest snapshot (but same issue with Infinispan 5.1.2.CR1)

      - JDK 6, patch 30

      - Tomcat 6.0.32


      Any ideas?


      Thanks in advance.