activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mate <mj-li...@expertsystems.se>
Subject Why are acks sent after rollback?
Date Fri, 02 Nov 2012 06:24:49 GMT
I'm trying to find the correct configuration for our first JMS setup, using
JTA transactions for our consumer. I am unable to get redelivery (on
RuntimeException) working, when using JTA. Using non-XA config works 
however.

Doing a bit of digging, I have concluded that
TransactionContext.rollback(Xid) is properly invoked and the rollback
command has been sent to the broker. However, after that has been done, the
synchronization registered in
org.apache.activemq.ActiveMQMessageConsumer.close() is invoking doClose(),
which in turn calls dispose() and then - because !session.getTransacted() -
deliverAcks() which I suppose is why redelivery does not work.

But why does this happen???
Should session.getTransacted() really be false during rollback...?

Snippets from my Spring config:

   <bean id="jmsXaConnectionFactory" 
class="org.apache.activemq.pool.XaPooledConnectionFactory" 
destroy-method="stop">
     <property name="connectionFactory">
       <bean class="org.apache.activemq.ActiveMQXAConnectionFactory" 
p:brokerURL="${brokerUrl}" />
     </property>
     <property name="transactionManager" ref="jtaTransactionManager" />
   </bean>

   <bean 
class="org.springframework.jms.listener.DefaultMessageListenerContainer" 
p:connectionFactory-ref="jmsXaConnectionFactory"
         p:transactionManager-ref="transactionManager"
         p:destination="..." p:messageListener="..." />

I'm using ActiveMQ 5.6.0

Thanks in advance.

   </Mattias>



--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-are-acks-sent-after-rollback-tp4658629.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message