activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [08/17] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5080 - revert short circut of recover when failover transport is not connected - using maxstartupMaxReconnectAttempts=x provides a better alternative. tm recovery need not start a man
Date Wed, 17 Dec 2014 23:36:23 GMT
https://issues.apache.org/jira/browse/AMQ-5080 - revert short circut of recover when failover
transport is not connected - using maxstartupMaxReconnectAttempts=x provides a better alternative.
tm recovery need not start a managed connection or call getConnection before a call to xaresource.recover


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/d8b126db
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d8b126db
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d8b126db

Branch: refs/heads/activemq-5.10.x
Commit: d8b126dbed7e34f7bbd7fefa43127f2938f5f56f
Parents: e4183ec
Author: gtully <gary.tully@gmail.com>
Authored: Mon Jul 28 15:54:12 2014 +0100
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Wed Dec 17 14:57:55 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/activemq/TransactionContext.java   | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/d8b126db/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java b/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
index 8e36ed2..c86f448 100755
--- a/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
+++ b/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
@@ -643,20 +643,11 @@ public class TransactionContext implements XAResource {
     }
 
     public Xid[] recover(int flag) throws XAException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Recover: " + flag);
-        }
+        LOG.debug("recover({})", flag);
 
         TransactionInfo info = new TransactionInfo(getConnectionId(), null, TransactionInfo.RECOVER);
         try {
             this.connection.checkClosedOrFailed();
-            final FailoverTransport failoverTransport = this.connection.getTransport().narrow(FailoverTransport.class);
-            if (failoverTransport != null && !failoverTransport.isConnected()) {
-                // otherwise call will block on reconnect forfeting any app level periodic
check
-                XAException xaException = new XAException("Failover transport not connected:
" + this.getConnection());
-                xaException.errorCode = XAException.XAER_RMERR;
-                throw xaException;
-            }
             this.connection.ensureConnectionInfoSent();
 
             DataArrayResponse receipt = (DataArrayResponse)this.connection.syncSendPacket(info);
@@ -668,7 +659,7 @@ public class TransactionContext implements XAResource {
                 answer = new XATransactionId[data.length];
                 System.arraycopy(data, 0, answer, 0, data.length);
             }
-            LOG.trace("recover({})={}", flag, answer);
+            LOG.debug("recover({})={}", flag, answer);
             return answer;
         } catch (JMSException e) {
             throw toXAException(e);


Mime
View raw message