diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-08-31 23:32:20 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-08-31 23:32:20 +0000 |
commit | 2ee8546efb452b00c6e04fa9e8b0d087b58b1e30 (patch) | |
tree | fc5748c14ae2737c55909553702ced3729038e3f | |
parent | 61765683737ee5c0a494a650440c78ef81267314 (diff) | |
download | qpid-python-2ee8546efb452b00c6e04fa9e8b0d087b58b1e30.tar.gz |
QPID-3461 The commit method implementation in AMQSession_0_10 now
handles the SessionException and throws a JMSException.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1163867 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java | 7 |
1 files changed, 7 insertions, 0 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 75d96d67af..b5868cd235 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 @@ -1007,6 +1007,13 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic } sendCommit(); } + catch(SessionException e) + { + JMSException ex = new JMSException("Session exception occured while trying to commit"); + ex.initCause(e); + ex.setLinkedException(e); + throw ex; + } catch (AMQException e) { throw new JMSAMQException("Failed to commit: " + e.getMessage(), e); |