1 Reply Latest reply on Nov 3, 2015 3:43 PM by Paul Ferraro

    Wildfly 10 - Infinispan configure local cache with storeAsBinary option

    Francesca Herpertz Newbie

      Hi all together,


      I was trying to configure jboss using a local cache with the option enabled - "store as binary". As described here https://issues.jboss.org/browse/ISPN-5657 it seems it is not supported in any version of wildfly so far.



      I came across the following stack overflow question: http://stackoverflow.com/questions/21490744/how-to-set-up-wildfly-as-with-infinispan-6-0  This gave me the idea to configure the standalone.xml like described above. Setting the "storeAsBinary" property on the standard SingleFileStoreConfigurationBuilder does not work. The Builderclass responsible does not have a setter specified for storeAsBinary. This xml snipped will try to call a method "setCallAsBinary(param)" which is not available on any of the CacheStoreBuilder Classes. The programmatically way to configure this would be - Builder.storeAsBinary().enable(). 


      Then I tried the following - I created my own wrapper class CustomSingleFileStoreConfigurationBuilder which extends the SingleFileStoreConfigurationBuilder and gave it the required setter to set the storeAsBinary property via the above mentioned XML. 


      Basically I followed this article to create my own builder class etc.:



      Linked examples:



      Although my classes and annotations are configured like shown in the example above - I still get the following error message:

      12:04:09,222 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 44) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "infinispan"),

          ("cache-container" => "metaData"),

          ("local-cache" => "metaCache"),

          ("store" => "custom")

      ]) - failure description: "WFLYCLINF0010: com.package.name.infinispan.CustomSingleFileStoreConfigurationBuilder is not a valid cache store"


      I have placed the newly created configuration builder etc. classes in a global module which is configured like this:



                      <module name="com.package.name.config" slot="main"/>




      I added the cache store like this to my infinispan subsystem:



                  <cache-container name="metaData">


                      <local-cache name="metaCache" jndi-name="java:/some_cache/MetaCache">

                          <locking concurrency-level="3"/>

                          <transaction mode="FULL_XA" locking="OPTIMISTIC"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <store class="com.package.name.infinispan.CustomSingleFileStoreConfigurationBuilder">

                              <property name="storeAsBinary">







      But it does not seem to work. I could not find any additional information concerning this matter. What is the correct way to specify a cache store and what makes a cache store valid? Could you perhaps help me to figure out what I am doing wrong?

      Thank you very much already and kind regards,