JBoss Community

Need help to migrate JBOSS-Cache to Infinispan 5.1.x

created by seyed z in JBoss AS 7 Development - View the full discussion

I am in process of migrating my application from AS-5.1.0 GA to 7.1.1. I have gone (at least it think I have) through all steps defined in the migration documentation.  The only part I am having issue is porting from jboss-cache to infispan. What I have is a JMX based cache defined in my-jboss-beans.xml as such:

 

<?xml version="1.0" encoding="UTF-8"?>

<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

            xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"

            xmlns="urn:jboss:bean-deployer:2.0">


 

    <bean name="AppCacheFactory" class="org.jboss.cache.DefaultCacheFactory"/>

 

    <bean name="DefaultCacheConfig" class="org.jboss.cache.config.Configuration">

        <!-- Externally injected services -->

        <property name="runtimeConfig">

            <bean class="org.jboss.cache.config.RuntimeConfig">

                <property name="transactionManager">

                    <inject bean="jboss:service=TransactionManager" property="TransactionManager"/>

                </property>

            </bean>

        </property>

        <property name="lockAcquisitionTimeout">15000</property>

        <property name="exposeManagementStatistics">true</property>

        <property name="evictionConfig">

            <bean class="org.jboss.cache.config.EvictionConfig">

                <property name="wakeupInterval">5000</property>

                <!--                 Overall default -->

                <property name="defaultEvictionRegionConfig">

                    <bean class="org.jboss.cache.config.EvictionRegionConfig">

                        <property name="regionName">/</property>

                        <property name="evictionAlgorithmConfig">

                            <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">

                                <!-- Evict LRU node once we have more than this number of nodes -->

                                <property name="maxNodes">10000</property>

                                <!-- And, evict any node that hasn't been accessed in this many seconds -->

                                <property name="timeToLiveSeconds">1000</property>

                                <!-- Don't evict a node that's been accessed within this many seconds.

                    Set this to a value greater than your max expected transaction length. -->

                                <property name="minTimeToLiveSeconds">120</property>

                            </bean>

                        </property>

                    </bean>

                </property>

                <property name="evictionRegionConfigs">

                    <list>

                        <!-- Don't ever evict modification timestamps -->

                        <bean class="org.jboss.cache.config.EvictionRegionConfig">

                            <property name="regionName">/TS</property>

                            <property name="evictionAlgorithmConfig">

                                <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>

                            </property>

                        </bean>

                    </list>

                </property>

            </bean>

        </property>

    </bean>

 

    <bean name="AppCacheJmxWrapper" class="org.jboss.cache.jmx.CacheJmxWrapper">

    <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="MyApp.cache:name=xyz",exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class,registerDirectly=true)</annotation>

        <constructor>

            <parameter>

                <bean class="org.jboss.cache.Cache">

                    <constructor factoryMethod="createCache">

                        <factory bean="AppCacheFactory"/>

                        <parameter class="org.jboss.cache.config.Configuration">

                            <inject bean="DefaultCacheConfig"/>

                        </parameter>

                        <parameter>true</parameter>

                    </constructor>

                </bean>

            </parameter>

        </constructor>

    </bean>

</deployment>

 

Can somebody point me in the right direction on this.  How the above is acheived in AS-7.x?  Thanks in advance.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community