diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-05-29 11:39:25 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-05-29 11:39:25 +0000 |
| commit | 5ff21aeaff44c5e4377c392499cd3654b3f17d2c (patch) | |
| tree | 79e0626b1eec511a5cafb4b9e1c36ebd091900f6 /java/client | |
| parent | 90130b03d9be32267b47a6dfc222bdbff9a8cc45 (diff) | |
| download | qpid-python-5ff21aeaff44c5e4377c392499cd3654b3f17d2c.tar.gz | |
QPID-3986, QPID-4009, QPID-4017: add constants for system properties/defaults. Update default values for flow control timeouts to be consistent between 0-8/9/9-1 and 0-10 client paths (60sec). Increase the 'failover method timeout' for 0-8/9/9-1 client path to 120sec. Update documentation accordingly.
Work by Philip Harvey <phil@philharveyonline.com> and myself, based on review feedback.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1343680 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQSession.java | 12 | ||||
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/jms/FailoverPolicy.java | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java index 92a8f88d28..e500dac9e3 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java @@ -20,6 +20,11 @@ */ package org.apache.qpid.client; +import static org.apache.qpid.configuration.ClientProperties.DEFAULT_FLOW_CONTROL_WAIT_FAILURE; +import static org.apache.qpid.configuration.ClientProperties.DEFAULT_FLOW_CONTROL_WAIT_NOTIFY_PERIOD; +import static org.apache.qpid.configuration.ClientProperties.QPID_FLOW_CONTROL_WAIT_FAILURE; +import static org.apache.qpid.configuration.ClientProperties.QPID_FLOW_CONTROL_WAIT_NOTIFY_PERIOD; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -117,18 +122,17 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic /** Immediate message prefetch default. */ public static final String IMMEDIATE_PREFETCH_DEFAULT = "false"; - public static final long DEFAULT_FLOW_CONTROL_WAIT_FAILURE = 120000L; - /** * The period to wait while flow controlled before sending a log message confirming that the session is still * waiting on flow control being revoked */ - private final long _flowControlWaitPeriod = Long.getLong("qpid.flow_control_wait_notify_period",5000L); + private final long _flowControlWaitPeriod = Long.getLong(QPID_FLOW_CONTROL_WAIT_NOTIFY_PERIOD, + DEFAULT_FLOW_CONTROL_WAIT_NOTIFY_PERIOD); /** * The period to wait while flow controlled before declaring a failure */ - private final long _flowControlWaitFailure = Long.getLong("qpid.flow_control_wait_failure", + private final long _flowControlWaitFailure = Long.getLong(QPID_FLOW_CONTROL_WAIT_FAILURE, DEFAULT_FLOW_CONTROL_WAIT_FAILURE); private final boolean _delareQueues = diff --git a/java/client/src/main/java/org/apache/qpid/jms/FailoverPolicy.java b/java/client/src/main/java/org/apache/qpid/jms/FailoverPolicy.java index de3d8e67fd..0b4f0800d2 100644 --- a/java/client/src/main/java/org/apache/qpid/jms/FailoverPolicy.java +++ b/java/client/src/main/java/org/apache/qpid/jms/FailoverPolicy.java @@ -33,9 +33,7 @@ public class FailoverPolicy { private static final Logger _logger = LoggerFactory.getLogger(FailoverPolicy.class); - private static final long MINUTE = 60000L; - - private final long DEFAULT_METHOD_TIMEOUT = Long.getLong("qpid.failover_method_timeout", 1 * MINUTE); + private final long DEFAULT_METHOD_TIMEOUT = Long.getLong("qpid.failover_method_timeout", 120000); private FailoverMethod[] _methods = new FailoverMethod[1]; |
