ModeShape 3.8中不会保留数据

时间:2016-10-19 05:25:06

标签: infinispan modeshape

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

在pom.xml中

  1. 振型-JCR
  2. 振型-JCR-API
  3. 振型示意
  4. 振型-BOM包埋
  5. Infinispan的核
  6. 在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>
    

    任何人帮助我???

2 个答案:

答案 0 :(得分:1)

在更改后的infinispan-conf.xml中

http://www.infinispan.org/schemas/infinispan-config-5.3.xsd&#34;&GT;

    <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>   

答案 1 :(得分:0)

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

我的猜测是你在重启tomcat时删除临时目录。您需要确保将其写入更“永久”的目录。