From 7fee0f39c4539c6348494ad902de348245b0b610 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Tue, 14 Oct 2014 16:13:20 +0000 Subject: QPID-6152: [Java Client] Allow connection/session close time to be overridden by system property. Change implementation so that the timeout is applied individually to each session close, the connection and the shutdown of the task pool. Also moved the shutdown of the task pool to a finally, so that it occurs even if one or more sessions fail to close. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1631810 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpid/configuration/ClientProperties.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qpid/java/common/src') diff --git a/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java index b29e77f14d..86f5ddeeed 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java @@ -133,6 +133,18 @@ public class ClientProperties */ public static final int DEFAULT_SYNC_OPERATION_TIMEOUT = 60000; + /** + * System properties to change the default timeout used whilst closing connections + * and underlying sessions. + */ + public static final String QPID_CLOSE_TIMEOUT = "qpid.close_timeout"; + + /** + * A default timeout value for close operations + */ + public static final int DEFAULT_CLOSE_TIMEOUT = 2000; + + /** * System properties to change the default value used for TCP_NODELAY */ -- cgit v1.2.1