qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject qpid-jms git commit: NO-JIRA: trivial update to provide clarity without reading the docs
Date Thu, 24 Sep 2015 10:20:10 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master ed1dd4116 -> b2169f6aa


NO-JIRA: trivial update to provide clarity without reading the docs


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

Branch: refs/heads/master
Commit: b2169f6aa5d19df599fed22b9ad49849ecc12394
Parents: ed1dd41
Author: Robert Gemmell <robbie@apache.org>
Authored: Thu Sep 24 10:15:59 2015 +0100
Committer: Robert Gemmell <robbie@apache.org>
Committed: Thu Sep 24 11:12:45 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/b2169f6a/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 02c4c82..2970533 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
@@ -66,9 +66,10 @@ public class FailoverProvider extends DefaultProviderListener implements
Provide
     private static final Logger LOG = LoggerFactory.getLogger(FailoverProvider.class);
 
     public static final int UNLIMITED = -1;
+    private static final int UNDEFINED = -1;
 
     public static final int DEFAULT_MAX_RECONNECT_ATTEMPTS = UNLIMITED;
-    public static final int DEFAULT_STARTUP_MAX_RECONNECT_ATTEMPTS = UNLIMITED;
+    public static final int DEFAULT_STARTUP_MAX_RECONNECT_ATTEMPTS = UNDEFINED;
     public static final long DEFAULT_INITIAL_RECONNECT_DELAY = 0;
     public static final long DEFAULT_RECONNECT_DELAY = 10;
     public static final long DEFAULT_MAX_RECONNECT_DELAY = TimeUnit.SECONDS.toMillis(30);
@@ -691,7 +692,9 @@ public class FailoverProvider extends DefaultProviderListener implements
Provide
 
     private int reconnectAttemptLimit() {
         int maxReconnectValue = this.maxReconnectAttempts;
-        if (firstConnection && this.startupMaxReconnectAttempts != UNLIMITED) {
+        if (firstConnection && this.startupMaxReconnectAttempts != UNDEFINED) {
+            // If this is the first connection and a specific startup retry limit
+            // is configured then use it, otherwise use the main reconnect limit
             maxReconnectValue = this.startupMaxReconnectAttempts;
         }
         return maxReconnectValue;


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


Mime
View raw message