1 Reply Latest reply on Jun 8, 2011 8:54 AM by bcarothers

    Persistence with Modeshape and Infinispan connector.

    aesteban

      Hi!

      I'm having problems using the InifinispanSource connector to make my data persistent.

      The storage in the JCR nodes works fine, I can save and read data. Now I'm trying to make the data persistent using the FileCacheStore Infinispan  cache and it doesn't work.

      I developed a web service, which is responsible for the storage and read of the data. The web service is deployed on a Tomcat server. The web service uses modeshape to build the respositories and perform the storage operations. I am trying to make the data persistent, that is stored in an infinispan repository. The service  wangled to store the data in JCR Nodes in the infinispan repository but the persistence doesn't work. First I wanted to test the persistence in form of files, because is one of the easiest ways to do it with infinispan.

      I attached all the configuration files and the log file generated by application on the tomcat server.

      Do you have any idea, if I am missing something or doing something wrong?

       

      Than you in advanced

        • 1. Re: Persistence with Modeshape and Infinispan connector.
          bcarothers

          Your Inifnispan configuration is slightly off.  This line in infinispanFileCache.xml:

          <namedCache name="CacheStore">

          means that the Infinispan configuration only applies to the cache named "CacheStore".  However, ModeShape maps each JCR workspace to an Inifnispan cache with the same name as the workspace name.  Your ModeShape configuration uses "infinispanDefault" as the name of the default workspace in the InfinispanSource. 

           

          You can fix you problem in either of two ways. 

           

          1.  Replace "CacheStore" with "infinispanDefault" to make just that one workspace persist to disk; or,

          2.  Replace your whole Infinispan configuration file with the text below to make workspaces persist by default:

           

          <?xml version="1.0" encoding="UTF-8"?>

          <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="urn:infinispan:config:4.0 http://www.infinispan.org/schemas/infinispan-config-4.0.xsd"

              xmlns="urn:infinispan:config:4.0">

              <default>

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

                      <loader class="org.infinispan.loaders.file.FileCacheStore"

                          fetchPersistentState="true" ignoreModifications="false"

                          purgeOnStartup="false">

                          <properties>

                              <property name="location" value="/Users/bcarothers/infinispanFS" />

                          </properties>

                      </loader>

                  </loaders>

                  <eviction wakeUpInterval="50" maxEntries="1" strategy="FIFO" />

              </default>

          </infinispan>

          Please let us know if you run into any more problems!