3 Replies Latest reply on Sep 8, 2012 6:25 PM by eialbur

    Problem - NamedCache and invocationBatching

    eialbur

      5.1.6.FINAL

       

      I am using the Tree API for Infinispan.  I want to persist the cache.  I started with the following configuration xml for my loader:

      <infinispan>

          <default>

                    <loaders passivation="false" shared="false" preload="true">

                        <loader

                            class="org.infinispan.loaders.file.FileCacheStore"

                            fetchPersistentState="true"

                            purgerThreads="1"

                            purgeSynchronously="true"

                            ignoreModifications="false"

                            purgeOnStartup="false">

                            <properties>

                                <property name="location" value="/home/eialbur/infiniCache" />

                            </properties>

                        </loader>

                    </loaders>

                    <invocationBatching enabled="true"/>

          </default>

      </infinispan>

       

      This worked great, but I wanted it to be a named cache.  I modified the xml changing <default> to <namedCache name="foo">. 

      This now produces the runtime error: Cannot enable Invocation Batching when the Transaction Mode is NON_TRANSACTIONAL, set the transaction mode to TRANSACTIONAL

       

      So then I modified the xml as follows:

      <infinispan>

          <namedCache name="foo" >

                    <loaders passivation="false" shared="false" preload="true">

                        <loader

                            class="org.infinispan.loaders.file.FileCacheStore"

                            fetchPersistentState="true"

                            purgerThreads="1"

                            purgeSynchronously="true"

                            ignoreModifications="false"

                            purgeOnStartup="false">

                            <properties>

                                <property name="location" value="/home/eialbur/infiniCache" />

                            </properties>

                        </loader>

                    </loaders>

                    <transaction transactionMode="TRANSACTIONAL" />

                    <invocationBatching enabled="true"/>

          </namedCache>

      </infinispan>

       

      This now produces the following runtime error: invocationBatching is not enabled. Make sure this is enabled by calling configurationBuilder.invocationBatching().enable()

       

      I assume this is some sort of problem with Infinispan.  It appears that namedCache is having troubles with configuring from xml.