ModeShape 3.8 中不保留数据

Data is not persisted in ModeShape 3.8

最近我开始使用 ModeShape 3.8 和 Infinispan 5.3 进行一个项目。原始开发人员已经离开,没有任何文档。应用程序工作正常,除非它没有重新启动。关闭后所有数据都丢失了。可能是一些临时存储库但不确定。

在pom.xml

  1. modeshape-jcr
  2. modeshape-jcr-api
  3. 模式形状示意图
  4. modeshape-bom-嵌入式
  5. infinispan-核心

在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"
   }
}

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>

有人帮帮我吗???

您的文件存储正在写入“/lfs/enve/apps/tomcat/temp/”

我的猜测是您在重新启动时删除了临时目录 tomcat。您需要确保将其写入更多 "permanent" 目录。

在infinispan-conf.xml中做了如下改动

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>