summaryrefslogtreecommitdiff
path: root/java/client
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2012-07-30 19:35:32 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2012-07-30 19:35:32 +0000
commit1de9295b0d53e3c176f86f0ffcf318cef055c661 (patch)
tree4d28095ca8f220ec7d8b3db26b44668e7cb514af /java/client
parent7f20dbdf6aa0ce95a5330a79b9c5c0ad1a52f83d (diff)
downloadqpid-python-1de9295b0d53e3c176f86f0ffcf318cef055c661.tar.gz
QPID-3575 Changed the name of the system prop to
"qpid.session.legacy_exception_behaviour". The system prop will now restore the old behavior. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1367241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
index 2402c06f7f..8a7c6b1a01 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
+++ b/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);
}