简体   繁体   中英

Where to locate configuration.xml of Infinispan

I'm new with Infinispan and I must configure Infinispan as distributed-cache.

I have just create the jdg.properties and also create the configuration.xml where I set the distributed-cache like this:

<distributed-cache name="core_report"
        mode="ASYNC" segments="20" owners="1" remote-timeout="30000" start="EAGER">

        <locking acquire-timeout="30000" concurrency-level="1000"
            striping="false" />
        <transaction mode="NONE" />

        <eviction max-entries="100000" strategy="LIRS" />
        <expiration lifespan="-1" max-idle="-1" />

        <persistence>
            <file-store shared="true" preload="true" passivation="true"
                fetch-state="true" read-only="false" purge="false" path="file-store">
                <write-behind flush-lock-timeout="15000"
                    thread-pool-size="5" />
            </file-store>
        </persistence>

    </distributed-cache>

Now I don't understand where to locate this file. In the web project or in the remote machine?

I would like to understand better. Thank all

I was thinking about the quickest way how to convey the most relevant information here...

Apart from suggesting that you can consult our documentation: http://infinispan.org/docs/7.1.x/user_guide/user_guide.html#_configuring_cache_declaratively I also highly recommend to look at clustered-cache infinispan-quickstart .

https://github.com/infinispan/infinispan-quickstart/tree/master/clustered-cache

After short look you can find out the exact directory structure and where are configuration files usually put. It is src/main/resources folder -- see infinispan.xml file at that location.

I suggest mimicking above mentioned quickstart as it seems to be really straightforward approach for your issue.

Note: you can have your infinispan.xml configuration file where ever you want and use absolute path to that file in new DefaultCacheManager definition.

I suppose your deployment is InVM usage. If you want to configure infinispan-server, you can change server configuration file that is located in ispn-server/standalone/configuration/ folder. Commonly standalone.xml or clustered.xml .

PS: If anything, comment, I will respond asap here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM