简体   繁体   中英

How to set up Wildfly AS with Infinispan 6.0

I'd like to setup a Wildfly Application Server with Infinispan Cache. The cache should hold a lot of items in memory and from time to time evict the oldest into a Cache Store. I'd like to use the SingleFileStore, because it has some performance advances and is included into the default package as far as i have read.

My problem is how to configure this cache store. First, can I use the downloaded Wildfly 8 binaries or do i have to load further jars ( or add other jars to my pom file ), in order to use SingleFileStore.

Then the configuration. I changed Wildfly's standalone.xml like this:

<subsystem xmlns="urn:jboss:domain:infinispan:2.0">

   ... the included cache-containers ...

   <cache-container name="my-store" default-cache="my-file-store" 
      jndi-name="my_cache" start="EAGER">

      <local-cache name="my-file-store" start="EAGER">
          <transaction mode="NON_XA"/>
          <eviction strategy="LIRS" max-entries="10000"/>
          <store class="org.infinispan.persistence.file.SingleFileStore" 
              preload="true" passivation="true" singleton="true">
      </store>
     </local-cache>
   </cache-container>
</subsystem>

... but it does not work correctly during startup I get the following message

22:47:25,901 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "infinispan"),
    ("cache-container" => "my-store"),
    ("local-cache" => "my-file-store")
]) - failure description: "JBAS010292: org.infinispan.persistence.file.SingleFileStore is not a valid cache store"

Does anyone have a configuration that works? Because the given documentation I am unable to set it up correctly.

Any help is highly appreciated!

Regards Akira

You need to supply a class that knows how to configure and build that store instance instead of the implementation class.

You need to change the class to:

<store class="org.infinispan.configuration.cache.SingleFileStoreConfigurationBuilder" ... />

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