You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2014/12/16 18:19:06 UTC
[3/5] activemq-6 git commit: Add TM Locator impl to JMSBridge tests
Add TM Locator impl to JMSBridge tests
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/39c61014
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/39c61014
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/39c61014
Branch: refs/heads/master
Commit: 39c61014ac6bb755c3afeeb9fdbe5d3121b6f4b8
Parents: 64cc435
Author: Martyn Taylor <mt...@redhat.com>
Authored: Fri Dec 12 12:51:23 2014 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Tue Dec 16 16:33:58 2014 +0000
----------------------------------------------------------------------
.../apache/activemq/jms/bridge/impl/JMSBridgeImpl.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/39c61014/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java
index fed9420..cefc928 100644
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java
+++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/bridge/impl/JMSBridgeImpl.java
@@ -402,7 +402,10 @@ public final class JMSBridgeImpl implements JMSBridge
checkParams();
- TransactionManager tm = ServiceUtils.getTransactionManager();
+ if (tm == null)
+ {
+ tm = ServiceUtils.getTransactionManager();
+ }
// There may already be a JTA transaction associated to the thread
@@ -1015,7 +1018,10 @@ public final class JMSBridgeImpl implements JMSBridge
ActiveMQJMSBridgeLogger.LOGGER.trace("Starting JTA transaction");
}
- TransactionManager tm = ServiceUtils.getTransactionManager();
+ if (tm == null)
+ {
+ tm = ServiceUtils.getTransactionManager();
+ }
// Set timeout to a large value since we do not want to time out while waiting for messages
// to arrive - 10 years should be enough