summaryrefslogtreecommitdiff
path: root/java/client
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2011-09-12 14:36:27 +0000
committerRobert Gemmell <robbie@apache.org>2011-09-12 14:36:27 +0000
commitc6198c637cf03896563157802dccc4d62012acb9 (patch)
tree2f010144762b6ca33f897e7057c4c51dd0a33fd1 /java/client
parent4e16698cc44b6d8f5709cc75265b129d8947f2e3 (diff)
downloadqpid-python-c6198c637cf03896563157802dccc4d62012acb9.tar.gz
QPID-3449: adds ability to override the session timeout via JVM properties qpid.sync_op_timeout and the legacy amqj.default_syncwrite_timeout, across all protocol versions
Applied patch by Oleksandr Rudyy <orudyy@gmail.com> and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1169773 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
index 624cf67593..208496ec41 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
@@ -47,6 +47,7 @@ import org.apache.qpid.client.state.AMQStateManager;
import org.apache.qpid.client.state.StateWaiter;
import org.apache.qpid.client.state.listener.SpecificMethodFrameListener;
import org.apache.qpid.codec.AMQCodecFactory;
+import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.framing.AMQBody;
import org.apache.qpid.framing.AMQDataBlock;
import org.apache.qpid.framing.AMQFrame;
@@ -163,7 +164,9 @@ public class AMQProtocolHandler implements ProtocolEngine
private FailoverException _lastFailoverException;
/** Defines the default timeout to use for synchronous protocol commands. */
- private final long DEFAULT_SYNC_TIMEOUT = Long.getLong("amqj.default_syncwrite_timeout", 1000 * 30);
+ private final long DEFAULT_SYNC_TIMEOUT = Long.getLong(ClientProperties.QPID_SYNC_OP_TIMEOUT,
+ Long.getLong(ClientProperties.AMQJ_DEFAULT_SYNCWRITE_TIMEOUT,
+ ClientProperties.DEFAULT_SYNC_OPERATION_TIMEOUT));
/** Object to lock on when changing the latch */
private Object _failoverLatchChange = new Object();