pbuchheit
pbuchheit

Reputation: 1607

Migrating The Xml Configuration File For Infinispan

I'm in the process of migrating a Jboss application from Jboss 6 AS to Wildfly. As part of the process, I need to update my infinispan cache configuration to comply with the version used by Wildfly. The application is currently using infinispan 4.0 and I need to upgrade it to version 9.0 or newer. I have found a few bits and pieces of information, but I can't find any sort of comprehensive documentation on what changes I need to make to the XML configuration. Does anyone know of some good documentation, or better yet a migration script?

For reference here is the old config file:

<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns="urn:infinispan:config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:4.0 http://jboss.org/infinispan ">
   
   <global>
         <globalJmxStatistics enabled="true" jmxDomain="com.tura.product" />
   </global>
   <default >
     <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" useLockStriping="false" concurrencyLevel="1000"/>
        <jmxStatistics enabled="true" />
        <lazyDeserialization enabled="true"/>
        <invocationBatching enabled="true"/>
        <loaders passivation="true">
          <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="true">
            <properties>
              <property name="location" value="${jboss.server.data.dir}${/}product"/>
            </properties>
          </loader>
        </loaders>
   </default>
 
</infinispan>

In particular I am stuck on the <loaders> section. It seems like that feature has been removed, but I can't find any information about what it was replaced with.

Upvotes: 0

Views: 364

Answers (1)

Tristan Tarrant
Tristan Tarrant

Reputation: 1504

The following should work:

<infinispan
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:infinispan:config:9.4 https://infinispan.org/schemas/infinispan-config-9.4.xsd"
        xmlns="urn:infinispan:config:9.4">

   <cache-container name="default" default-cache="default">
      <local-cache name="default" statistics="true">
         <locking acquire-timeout="15000" concurrency-level="1000"/>
         <transaction mode="BATCH"/>
         <persistence passivation="true">
            <file-store fetch-state="true" purge="true" path="${jboss.server.data.dir}${/}product"/>
         </persistence>
      </local-cache>
   </cache-container>
</infinispan>

Upvotes: 2

Related Questions