You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/01/12 21:29:12 UTC

qpid-jms git commit: Add an additional log and some extra comments.

Repository: qpid-jms
Updated Branches:
  refs/heads/master 46415a275 -> f5a062967


Add an additional log and some extra comments.  

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

Branch: refs/heads/master
Commit: f5a062967595a07ef3b7e389cf1af818ec5e60f9
Parents: 46415a2
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Jan 12 15:29:06 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Jan 12 15:29:06 2015 -0500

----------------------------------------------------------------------
 .../apache/qpid/jms/provider/failover/FailoverProvider.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/f5a06296/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
index 1e2f65a..06d3c9a 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
@@ -508,11 +508,16 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
 
     /**
      * Called when the Provider was either first created or when a connection failure has
-     * been connected.  A reconnection attempt is immediately executed on the connection
+     * been reported.  A reconnection attempt is immediately executed on the connection
      * thread.  If a new Provider is able to be created and connected then a recovery task
      * is scheduled on the main serializer thread.  If the connect attempt fails another
      * attempt is scheduled based on the configured delay settings until a max attempts
      * limit is hit, if one is set.
+     *
+     * Since the initialize is put on the serializer thread this thread stops and does
+     * not queue another connect task.  This allows for the reconnect delay to be reset
+     * and a failure to initialize a new connection restarts the connect process from the
+     * point of view that connection was lost and an immediate attempt cycle should start.
      */
     private void triggerReconnectionAttempt() {
         if (closed.get() || failed.get()) {
@@ -564,6 +569,7 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
                 }
 
                 long delay = nextReconnectDelay();
+                LOG.trace("Next reconnect attempt will be in {} milliseconds", delay);
                 connectionHub.schedule(this, delay, TimeUnit.MILLISECONDS);
             }
         });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org