Atomikos Forum |
|
Finally, I've got a running version of Spring/Hibernate/Mysql and Atomikos (3.3.2)!!
However, I've got problems with long running transactions (~15 min!). I get the following exception: java.lang.IllegalStateException: wrong state: ABORTING at com.atomikos.icatch.imp.CoordinatorImp.registerSynchronization(Unknow n Source) at com.atomikos.icatch.imp.TransactionStateHandler.registerSynchronizati on(Unknown Source) at com.atomikos.icatch.imp.CompositeTransactionImp.registerSynchronizati on(Unknown Source) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(Unknown Source) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(Unknown Source) -------------------------------------------------------- I've configured the transactionTimeout of my UserTransactionImp bean with a value of 1200 (~20 min). After ~6 minutes I get then the exception. I've tried to track it down and found that the ActiveStateHandler is initiating the rollback, notified by the PooledAlarmTimer. Am I missing any other setting? I've seen the fields rollBackTicks which is not configurable and the property maintenanceInterval (which is nowhere explained in the documentation). I've tried to set the transactionTimeout and maintenanceInterval to ridiculus high numbers, but am still getting the same error... Any help would be appreciated! Thanks in advance!
Hi,
I've managed to get rid of the actual exception by adding the om.atomikos.icatch.max_timeout property. However, I'm now getting an AtomikosSQLException: connection is closed. I've tried several different configurations but couldn't figure out what I'm missing. - com.atomikos.icatch.serial_jta_transactions? - <property name="transactionSynchronizationName" value="SYNCHRONIZATION_ON_ACTUAL_TRANSACTION"/>? - <property name="exclusiveConnectionMode" value="true"/>? (NO LONGER AVAILABLE IN Atomikos 3.3.2) - wrong setting of hibernate.connection.release_mode? Anybody any idea? Cheers
Here's my config:
<bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp" init-method="init" destroy-method="shutdownForce"> <constructor-arg> <props> <prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop> <prop key="com.atomikos.icatch.console_file_name">${transaction.manager.console.file}</prop> <prop key="com.atomikos.icatch.console_log_level">${transaction.manager.console.log.level}</prop> <prop key="com.atomikos.icatch.log_base_name">${transaction.manager.log.base}</prop> <prop key="com.atomikos.icatch.tm_unique_name">${transaction.manager.unique.name}</prop> <prop key="com.atomikos.icatch.max_timeout">3600000</prop> </props> </constructor-arg> </bean> <bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" depends-on="userTransactionService"> <property name="startupTransactionService" value="true"/> <property name="forceShutdown" value="true"/> </bean> <bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp" depends-on="userTransactionService"> <property name="transactionTimeout" value="3500" /> </bean> <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"> <property name="transactionManager" ref="atomikosTransactionManager"/> <property name="userTransaction" ref="atomikosUserTransaction"/> <property name="transactionSynchronizationName" value="SYNCHRONIZATION_ON_ACTUAL_TRANSACTION"/> </bean> <bean id="fadsDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close"> <property name="uniqueResourceName" value="FADSXADBMS"/> <property name="xaDataSourceClassName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/> <property name="xaProperties"> <props> <prop key="user">${fads.jdbc.username}</prop> <prop key="password">${fads.jdbc.password}</prop> <prop key="url">${fads.jdbc.url}</prop> </props> </property> <property name="maxPoolSize" value="10"/> </bean> <bean id="fadsSessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="fadsDataSource" /> <property name="hibernateProperties"> <props> <prop key="hibernate.show_sql">false</prop> <prop key="hibernate.connection.useUnicode">true</prop> <prop key="hibernate.connection.charSet">utf8</prop> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop> <prop key="hibernate.connection.autocommit">false</prop> <prop key="hibernate.connection.release_mode">after_transaction</prop> <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop> <prop key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup</prop> <prop key="javax.persistence.transactionType">jta</prop> </props> </property> <property name="annotatedClasses"> <list> ... </list> </property> </bean> |