activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlitvak1 <>
Subject XA transaction is not rolledback in DefaultMessageListenerContainer
Date Wed, 27 Apr 2011 18:26:36 GMT
I use Spring 3.1 and AMQ 5.4
I need to do trivial things and it does not work. Idea is to get a message,
put it to DB and commit into 2 systems. I use Weblogic JTA transaction
manager which works fine with Tibco EMS.
Listener's onMessage() throws RuntimeException which is caught and
suppressed by AbstractPollingMessageListenerContainer:
				catch (Throwable ex) {
					if (status != null) {
						if (logger.isDebugEnabled()) {
							logger.debug("Rolling back transaction because of listener exception
thrown: " + ex);

Then transaction.commit happened with status above and I don't see message
removed from the Queue.This is what I need! But then no redelivery of
message happened and message marked as dequeued in AMQ UI.

AMQ settings are default whish suppose to use default RedeliveryPolicy.
Spring settings are:

  <bean id="jmsXAFactory"
     <property name="brokerURL" value="failover:(tcp://localhost:61616)" />

  <bean id="jmsXAConnectionFactory"
     <property name="connectionFactory" ref="jmsXAFactory" />
     <property name="jtaTransactionManager" ref="transactionManager" />

	<bean id="inQueue" class="org.apache.activemq.command.ActiveMQQueue">
		<constructor-arg value="IN.QUEUE"/>
  <bean id="AmqMDPContainer"
     <property name="concurrentConsumers" value="1" /> 
     <property name="maxConcurrentConsumers" value="1" />
     <property name="maxMessagesPerTask" value="1" />
     <property name="connectionFactory" ref="jmsXAConnectionFactory" />
     <property name="destination" ref="inQueue" />
     <property name="messageListener" ref="receiverMDP" />
     <property name="transactionManager" ref="transactionManager" />
     <property name="messageSelector" value=""/>



	<bean id="receiverMDP" class="com.integration.incoming.ReceiverMDP"></bean>

Please help!

View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message