diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-09-12 14:36:27 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-09-12 14:36:27 +0000 |
| commit | b789f68aad404483fef9bfe83901928c1ea231f1 (patch) | |
| tree | a47940b2a0c5d3a853e715de845a973ae8f18dfc /qpid/java/client/src | |
| parent | 56830ed4ce02e429fe06181db8f3603e47e48268 (diff) | |
| download | qpid-python-b789f68aad404483fef9bfe83901928c1ea231f1.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@1169773 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java index 624cf67593..208496ec41 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java +++ b/qpid/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(); |
