[jboss-dev-forums] [JBoss AS 7 Development] - Need help to migrate JBOSS-Cache to Infinispan 5.1.x

seyed z do-not-reply at jboss.com
Mon Jan 7 16:30:08 EST 2013


seyed z [https://community.jboss.org/people/seyed.z] created the discussion

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

To view the discussion, visit: https://community.jboss.org/message/788980#788980

--------------------------------------------------------------
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 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
[https://community.jboss.org/message/788980#788980]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130107/784917b7/attachment.html 


More information about the jboss-dev-forums mailing list