resolve unit test failures from changes via: https://issues.apache.org/activemq/browse/AMQ-2034 - only use sync for close if in xa tx, this may need some rework for managed tck case

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@734393 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-01-14 13:45:17 +00:00
parent d89abe0322
commit 3a56070500
2 changed files with 2 additions and 2 deletions

View File

@ -554,7 +554,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
*/ */
public void close() throws JMSException { public void close() throws JMSException {
if (!closed) { if (!closed) {
if (getTransacted()) { if (getTransactionContext().isInXATransaction()) {
if (!synchronizationRegistered) { if (!synchronizationRegistered) {
synchronizationRegistered = true; synchronizationRegistered = true;
getTransactionContext().addSynchronization(new Synchronization() { getTransactionContext().addSynchronization(new Synchronization() {

View File

@ -23,7 +23,7 @@ import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.test.JmsResourceProvider; import org.apache.activemq.test.JmsResourceProvider;
/** /**
* Test failover for Queues * Test failover for Topics
*/ */
public class TransactedTopicMasterSlaveTest extends JmsTopicTransactionTest { public class TransactedTopicMasterSlaveTest extends JmsTopicTransactionTest {
protected BrokerService slave; protected BrokerService slave;