activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: improve trace logging on failure and tidy up future - try to nail down intermittent duplex bridge half start
Date Thu, 18 Sep 2014 21:41:24 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk fb684db4a -> 4ff5a3e48


improve trace logging on failure and tidy up future - try to nail down intermittent duplex
bridge half start


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

Branch: refs/heads/trunk
Commit: 4ff5a3e48e312fe10bae206027646e8a5f6b1002
Parents: fb684db
Author: gtully <gary.tully@gmail.com>
Authored: Thu Sep 18 22:40:04 2014 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Sep 18 22:40:27 2014 +0100

----------------------------------------------------------------------
 .../network/DemandForwardingBridgeSupport.java         | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/4ff5a3e4/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
index f61c5ac..7d334ac 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
@@ -347,7 +347,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge,
Br
         try {
             remoteBrokerInfo = futureRemoteBrokerInfo.get();
             if (remoteBrokerInfo == null) {
-                fireBridgeFailed();
+                fireBridgeFailed(new Throwable("remoteBrokerInfo is null"));
                 return;
             }
         } catch (Exception e) {
@@ -358,7 +358,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge,
Br
         try {
             localBrokerInfo = futureLocalBrokerInfo.get();
             if (localBrokerInfo == null) {
-                fireBridgeFailed();
+                fireBridgeFailed(new Throwable("localBrokerInfo is null"));
                 return;
             }
 
@@ -592,7 +592,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge,
Br
                     ServiceSupport.dispose(getControllingService());
                 }
             });
-            fireBridgeFailed();
+            fireBridgeFailed(error);
         }
     }
 
@@ -871,7 +871,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge,
Br
                     ServiceSupport.dispose(getControllingService());
                 }
             });
-            fireBridgeFailed();
+            fireBridgeFailed(error);
         }
     }
 
@@ -1430,7 +1430,8 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge,
Br
         this.networkBridgeListener = listener;
     }
 
-    private void fireBridgeFailed() {
+    private void fireBridgeFailed(Throwable reason) {
+        LOG.trace("fire bridge failed, listener: {}", this.networkBridgeListener, reason);
         NetworkBridgeListener l = this.networkBridgeListener;
         if (l != null && this.bridgeFailed.compareAndSet(false, true)) {
             l.bridgeFailed();
@@ -1596,7 +1597,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge,
Br
 
         private final CountDownLatch slot = new CountDownLatch(1);
         private final AtomicBoolean disposed;
-        private BrokerInfo info = null;
+        private volatile BrokerInfo info = null;
 
         public FutureBrokerInfo(BrokerInfo info, AtomicBoolean disposed) {
             this.info = info;


Mime
View raw message