Hibernate / Spring transaction issue with Infinispan L2 cache -
i trying use infinispan hibernate l2 cache application use technologies tomcat 6, hibernate 4 , spring 3.5. application running in tomcat , our current transaction manager is
org.springframework.orm.hibernate4.hibernatetransactionmanager
we have introduced following properties hibernate property file infinispan introduction.
hibernate.cache.region.factory_class=org.hibernate.cache.infinispan.infinispanregionfactory hibernate.transaction.factory_class=org.hibernate.transaction.jtatransactionfactory hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.jbossstandalonejtaplatform hibernate.transaction.manager_lookup_class=org.hibernate.cache.infinispan.tm.hibernatetransactionmanagerlookup
after introduction of infinispan lost stability of application , start different errors randomly. assume our infinispan configurations not correct (we use transnational cache). think our transaction manager , infinispan transaction settings not match. please advice correct configuration.
errors see
java.lang.illegalstateexception: transaction transactionimple < ac, basicaction: 0:ffff0a1e015a:c2f8:51921dac:3de status: actionstatus.aborted > not in valid state invoking cache operations on. org.springframework.transaction.illegaltransactionstateexception: transaction completed - not call commit or rollback more once per transaction
infinispan configuration file use
<?xml version="1.0" encoding="utf-8"?> <infinispan xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="urn:infinispan:config:5.1" xsi:schemalocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"> <global> <globaljmxstatistics enabled="true" jmxdomain="org.infinispan" allowduplicatedomains="true"/> <transport transportclass="org.infinispan.remoting.transport.jgroups.jgroupstransport" clustername="infinispan-hibernate-cluster" distributedsynctimeout="50000" strictpeertopeer="false"> <properties> <property name="configurationfile" value="jgroups.xml"/> </properties> </transport> </global> <default> </default> <namedcache name="aaa-replicated-cache-entity"> <clustering mode="replication"> <stateretrieval fetchinmemorystate="false" timeout="60000"/> <sync repltimeout="20000"/> </clustering> <locking isolationlevel="read_committed" concurrencylevel="1000" lockacquisitiontimeout="15000" uselockstriping="false"/> <eviction maxentries="10000" strategy="lru"/> <expiration maxidle="100000" wakeupinterval="5000"/> <lazydeserialization enabled="true"/> <transaction usesynchronization="true" transactionmode="transactional" autocommit="false" lockingmode="optimistic"/> <loaders passivation="false" shared="false" preload="false"> <loader class="org.infinispan.loaders.cluster.clustercacheloader" fetchpersistentstate="false" ignoremodifications="false" purgeonstartup="false"> <properties> <property name="remotecalltimeout" value="20000"/> </properties> </loader> </loaders> </namedcache> </infinispan>
Comments
Post a Comment