0

Recently I started working on a project using ModeShape 3.8 and Infinispan 5.3. Original developer already left without any documentation. Application is working fine unless it is not restarted. All data was lost as soon as it is shutdown. May be some transient repository but not sure.

In the pom.xml

  1. modeshape-jcr
  2. modeshape-jcr-api
  3. modeshape-schematic
  4. modeshape-bom-embedded
  5. infinispan-core

In the repo.json

{
   "name":"repo",
   "workspaces":{
      "default":"default",
      "allowCreation":true
   },
    "security":{"providers" : [
            {
                "name" : "Custom Provider",
                "classname" : "security.CustomRepoAuthProvider"
            }
        ]
      },
   "storage":{
      "cacheConfiguration":"/conf/infinispan-conf.xml",
      "cacheName":"filesystem"
   }
}

In the infinispan-conf.xml

http://www.infinispan.org/schemas/infinispan-config-5.3.xsd">

<global>
    <globalJmxStatistics enabled="false" allowDuplicateDomains="true"/>
</global>
<namedCache name="filesystem">
    <transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" transactionMode="TRANSACTIONAL" lockingMode="OPTIMISTIC"/>
    <loaders passivation="false" shared="false" preload="true">
        <fileStore fetchPersistentState="true" purgerThreads="3" purgeSynchronously="true" ignoreModifications="false" purgeOnStartup="false" location="/lfs/enve/apps/tomcat/temp/">
            <async enabled="true" flushLockTimeout="15000" threadPoolSize="5" />
            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000" />
        </fileStore>
    </loaders>
</namedCache>

Any body help me???

K Khalid
  • 23
  • 6

2 Answers2

1

In the infinispan-conf.xml made following changes

http://www.infinispan.org/schemas/infinispan-config-5.3.xsd">

    <global>
        <globalJmxStatistics enabled="false" allowDuplicateDomains="true"/>
    </global>
    <namedCache name="filesystem">
        <locking isolationLevel="READ_COMMITTED"/>
        <transaction
                transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
                transactionMode="TRANSACTIONAL"
                lockingMode="PESSIMISTIC"/>
        <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="/lfs/envd/apps/tomcat/temp/"/>
                </properties>
            </loader>
        </loaders>
    </namedCache>   
K Khalid
  • 23
  • 6
0

Your file store is writing to "/lfs/enve/apps/tomcat/temp/"

My guess is that you are deleting the temp directory when you are restarting tomcat. You would need to make sure to write it to a more "permanent" directory.

Mudokonman
  • 856
  • 4
  • 6