activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-5080 - some additional trace logging
Date Thu, 24 Jul 2014 14:19:31 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk fb569e3fb -> e1cd19e86


https://issues.apache.org/jira/browse/AMQ-5080 - some additional trace logging


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

Branch: refs/heads/trunk
Commit: e1cd19e86e0623987618e1281d3c09a73be7c4bf
Parents: fb569e3
Author: gtully <gary.tully@gmail.com>
Authored: Thu Jul 24 15:18:42 2014 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Jul 24 15:19:16 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/TransactionContext.java | 3 ++-
 .../org/apache/activemq/ra/ActiveMQManagedConnection.java     | 5 +++++
 .../java/org/apache/activemq/ra/ActiveMQResourceAdapter.java  | 7 ++-----
 .../java/org/apache/activemq/ra/LocalAndXATransaction.java    | 6 ++++++
 4 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/e1cd19e8/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 e780783..8e36ed2 100755
--- a/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
+++ b/activemq-client/src/main/java/org/apache/activemq/TransactionContext.java
@@ -653,7 +653,7 @@ public class TransactionContext implements XAResource {
             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().getTransport());
+                XAException xaException = new XAException("Failover transport not connected:
" + this.getConnection());
                 xaException.errorCode = XAException.XAER_RMERR;
                 throw xaException;
             }
@@ -829,6 +829,7 @@ public class TransactionContext implements XAResource {
     public String toString() {
         return "TransactionContext{" +
                 "transactionId=" + transactionId +
+                ",connection=" + connection +
                 '}';
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1cd19e8/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
----------------------------------------------------------------------
diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
index 30172cd..0b67613 100755
--- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
+++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
@@ -399,4 +399,9 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi
         return transactionContext;
     }
 
+    @Override
+    public String toString() {
+        return "[" + super.toString() + "," + physicalConnection +"]";
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1cd19e8/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
----------------------------------------------------------------------
diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
index b772beb..855ca43 100644
--- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
+++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
@@ -352,12 +352,9 @@ public class ActiveMQResourceAdapter extends ActiveMQConnectionSupport
implement
                             if (connection != null) {
                                 try {
                                     connection.close();
-                                } catch (JMSException ignored) {
-
-                                } finally {
-                                    setConnection(original);
-                                }
+                                } catch (JMSException ignored) {}
                             }
+                            setConnection(original);
                         }
                     }};
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/e1cd19e8/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
----------------------------------------------------------------------
diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java b/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
index f93ee0f..1dd7423 100755
--- a/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
+++ b/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
@@ -132,6 +132,7 @@ public class LocalAndXATransaction implements XAResource, LocalTransaction
{
 
     public Xid[] recover(int arg0) throws XAException {
         Xid[] answer = null;
+        LOG.trace("{} recover({})", new Object[]{this, arg0});
         answer = transactionContext.recover(arg0);
         LOG.trace("{} recover({}) = {}", new Object[]{this, arg0, answer});
         return answer;
@@ -163,4 +164,9 @@ public class LocalAndXATransaction implements XAResource, LocalTransaction
{
         transactionContext.cleanup();
         inManagedTx = false;
     }
+
+    @Override
+    public String toString() {
+        return "[" + super.toString() + "," + transactionContext + "]";
+    }
 }


Mime
View raw message