diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2012-07-30 21:18:16 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2012-07-30 21:18:16 +0000 |
commit | 974579e2632ec4e82346c35cbb85ac5bf7f39cc7 (patch) | |
tree | e0ab4f5a656182f78aaa69db54f8b588e280ba88 | |
parent | 63d62f8263e46ac4ce22885d82b5c2ab1e09d2de (diff) | |
download | qpid-python-974579e2632ec4e82346c35cbb85ac5bf7f39cc7.tar.gz |
Porting to 0.18 branch.
QPID-3575 Changed the name of the system prop to
"qpid.session.legacy_exception_behaviour". The system prop will now
restore the old behavior.
(cherry picked from commit 3f3d5165649e78bba094dce6443ff9eeeb56af0c)
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.18@1367309 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index 2402c06f7f..8a7c6b1a01 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -129,7 +129,7 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic */ private final RangeSet _txRangeSet = RangeSetFactory.createRangeSet(); private int _txSize = 0; - private boolean _isHardError = Boolean.getBoolean("qpid.session.is_hard_error"); + private boolean _isHardError = Boolean.getBoolean("qpid.session.legacy_exception_behaviour"); //--- constructors /** @@ -1051,15 +1051,18 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic AMQException amqe = new AMQException(AMQConstant.getConstant(code), _isHardError, se.getMessage(), se.getCause()); _currentException = amqe; } - cancelTimerTask(); - stopDispatcherThread(); - try - { - closed(_currentException); - } - catch(Exception e) + if (!_isHardError) { - _logger.warn("Error closing session", e); + cancelTimerTask(); + stopDispatcherThread(); + try + { + closed(_currentException); + } + catch(Exception e) + { + _logger.warn("Error closing session", e); + } } getAMQConnection().exceptionReceived(_currentException); } |