diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-08-02 16:37:34 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-08-02 16:37:34 +0000 |
| commit | 89edc041d56903f04d4fb4f3f3302d99a1387056 (patch) | |
| tree | d6783532ff4b7bd9e3d0e790c81771c0f008048e /qpid/java/broker | |
| parent | 93a4a90b2adb3f131554c3f601e31e9d18219e6d (diff) | |
| download | qpid-python-89edc041d56903f04d4fb4f3f3302d99a1387056.tar.gz | |
QPID-2899: ensure otherwise unhandled exceptions close the Session with an ExecutionException
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1153183 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
| -rw-r--r-- | qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java index 52d39978f3..5a6a9aa8b1 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java @@ -106,16 +106,23 @@ public class ServerSessionDelegate extends SessionDelegate @Override public void command(Session session, Method method) { - setThreadSubject(session); - - if(!session.isClosing()) + try { - super.command(session, method); - if (method.isSync()) + setThreadSubject(session); + + if(!session.isClosing()) { - session.flushProcessed(); + super.command(session, method); + if (method.isSync()) + { + session.flushProcessed(); + } } } + catch(RuntimeException e) + { + exception(session, method, ExecutionErrorCode.INTERNAL_ERROR, "Exception processing command: " + e); + } } @Override |
