summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-01-11 16:11:12 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-01-11 16:11:12 +0000
commitfd6d92c5fb399654fe65fb16d083c785f88dadb9 (patch)
treec87b27181cb42931198f6b8203c8d4c8db649543 /qpid/java/client
parente1d5ad015d274ea6206e2b6dcf43611b0b801035 (diff)
downloadqpid-python-fd6d92c5fb399654fe65fb16d083c785f88dadb9.tar.gz
This is a fix for QPID-2336
The fix allows an idle_timeout of zero to be set as the heartbeat interval with a warning message to say heartbeats are disabled. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@897922 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java2
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java10
2 files changed, 10 insertions, 2 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
index af21eb7ed0..9b5277257c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
@@ -163,7 +163,7 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
else
{
// use the default value set for all connections
- this.setIdleTimeout(Long.getLong(ClientProperties.IDLE_TIMEOUT_PROP_NAME,0));
+ this.setIdleTimeout(Long.getLong(ClientProperties.IDLE_TIMEOUT_PROP_NAME,ClientProperties.DEFAULT_IDLE_TIMEOUT));
}
String saslMechs = brokerDetail.getProperty("sasl_mechs")!= null?
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java b/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java
index e5050b4fbd..93ad7e5606 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java
@@ -68,9 +68,17 @@ public class ClientProperties
* by the broker in TuneOK it will be used as the heartbeat interval.
* If not a warning will be printed and the max value specified for
* heartbeat in TuneOK will be used
+ *
+ * The default idle timeout is set to 120 secs
*/
public static final String IDLE_TIMEOUT_PROP_NAME = "idle_timeout";
-
+ public static final long DEFAULT_IDLE_TIMEOUT = 120000;
+ /**
+ * This value will be used to determine the default destination syntax type.
+ * Currently the two types are Binding URL (java only) and the Addressing format (used by
+ * all clients).
+ */
+ public static final String DEST_SYNTAX = "dest_syntax";
/**
* ==========================================================