Atomikos Forum

Atomikos with ActiveMQ - commit & heuristic warnings

I'm using Atomikos transaction manager with JPA & ActiveMQ, and the 2 phase commit seems to work fine. However, I keep getting these warnings:

1) When I start tomcat I get many lines of:

WARN CoordinatorImp - Local heuristic termination of coordinator ... with state COMMITTING
This post default82df.html?community.6.2615.3 seems to suggests this is a bug in atomikos, but it's almost 2 years old, and I couldn't find anything newer... The solutions I saw were to set the log level for atomikos to ERROR, but then we might miss important information.

2) After tomcat is up and running I get repeating warnings of:

WARN CommitMessage - Unexpected error in commit
com.atomikos.icatch.HeurHazardException: Heuristic Exception
and then lots of atomikos INFO lines.

This might be related to the previous warning, but it might also be caused by something else...not sure.

As I mentioned, the actual commit seems to work fine. Also, these warning only started after I added ActiveMQ to atomikos (I didn't get these before, when atomikos only worked with jpa).

This is my spring configuration:

<bean
    class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />

<bean id="AtomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager"
    init-method="init" destroy-method="close">
    <property name="forceShutdown" value="false" />
</bean>

<bean id="AtomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
    <property name="transactionTimeout" value="300" />
</bean>

<bean id="transactionManager"
    class="org.springframework.transaction.jta.JtaTransactionManager">
    <property name="transactionManager" ref="AtomikosTransactionManager" />
    <property name="userTransaction" ref="AtomikosUserTransaction" />
    <property name="allowCustomIsolationLevels" value="true" />
</bean>

<bean id="xaFactory" class="org.apache.activemq.ActiveMQXAConnectionFactory">
    <property name="brokerURL" value="activemq_url" />
</bean>

<bean id="connectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean"
    init-method="init" destroy-method="close">
    <property name="uniqueResourceName" value="amq" />
    <property name="xaConnectionFactory" ref="xaFactory" />
    <property name="maxPoolSize" value="10" />
</bean>

<bean id="destination" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="myQueue" />
</bean>

<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="sessionTransacted" value="true" />
    <property name="defaultDestination" ref="destination" />
</bean>

<bean id="myMessageListener" class="MyListener" />

<jms:listener-container container-type="default"
    transaction-manager="transactionManager" acknowledge="transacted"
    concurrency="5">
    <jms:listener destination="myQueue" ref="myMessageListener"
        method="onMessage" />
</jms:listener-container>
Does anyone know where do these warnings come from? Is it really a bug in Atomikos? Is there some solution other than changing the log levels?
Ayelet Send private email
Monday, January 06, 2014
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics