resolve broker unit test testReceiveTwoThenCloseConnection(org.apache.activemq.ra.JmsXAQueueTransactionTest): ra test uses Auto ack mode but the xa tx has been cleaned up so amq just sees a close on auto ack so it delivers the ack. AMQ-2128 Keeping the tx around till after the close sorts this out. One question though, with the ack mode supposed to be ignored, does it makes sense for the RA to use a transacted ack mode when there is a transaction?

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@748258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-02-26 18:19:58 +00:00
parent d98ea376ba
commit 3266019825
1 changed files with 2 additions and 1 deletions

View File

@ -229,13 +229,14 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi
proxy.cleanup(); proxy.cleanup();
} }
proxyConnections.clear(); proxyConnections.clear();
localAndXATransaction.cleanup();
try { try {
((ActiveMQConnection)physicalConnection).cleanup(); ((ActiveMQConnection)physicalConnection).cleanup();
} catch (JMSException e) { } catch (JMSException e) {
throw new ResourceException("Could cleanup the ActiveMQ connection: " + e, e); throw new ResourceException("Could cleanup the ActiveMQ connection: " + e, e);
} }
// defer transaction cleanup till after close so that close is aware of the current tx
localAndXATransaction.cleanup();
} }