diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2007-01-19 14:05:48 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2007-01-19 14:05:48 +0000 |
| commit | df04f9dcf9d869f146923ac150b7110b1224f690 (patch) | |
| tree | 2c7c9dcff7fe20c4e1b5efa77759def325f3a457 /java/broker/src/main | |
| parent | 380e5b0d75fa8b4a663e39cfed69f81a10ec5980 (diff) | |
| download | qpid-python-df04f9dcf9d869f146923ac150b7110b1224f690.tar.gz | |
Solved multithreading issue in RequestManager where responses would arrive before the request made it into the requestMap. Fixed server's ChannelCloseHandler and ConnectionCloseMethodHandler to work with new write methods.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497820 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src/main')
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/handler/ChannelCloseHandler.java | 2 | ||||
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelCloseHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelCloseHandler.java index bfab8ac353..abd9b1a5b7 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelCloseHandler.java +++ b/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelCloseHandler.java @@ -54,10 +54,10 @@ public class ChannelCloseHandler implements StateAwareMethodListener<ChannelClos ChannelCloseBody body = evt.getMethod(); _logger.info("Received channel close for id " + evt.getChannelId() + " citing class " + body.classId + " and method " + body.methodId); - protocolSession.closeChannel(evt.getChannelId()); // AMQP version change: Hardwire the version to 0-9 (major=0, minor=9) // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. // Be aware of possible changes to parameter order as versions change. protocolSession.writeResponse(evt, ChannelCloseOkBody.createMethodBody((byte)0, (byte)9)); + protocolSession.closeChannel(evt.getChannelId()); } } diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java index 52760b38bf..be480e6ec5 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java +++ b/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java @@ -54,6 +54,10 @@ public class ConnectionCloseMethodHandler implements StateAwareMethodListener<C final ConnectionCloseBody body = evt.getMethod(); _logger.info("ConnectionClose received with reply code/reply text " + body.replyCode + "/" + body.replyText + " for " + protocolSession); + // AMQP version change: Hardwire the version to 0-9 (major=0, minor=9) + // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. + // Be aware of possible changes to parameter order as versions change. + protocolSession.writeResponse(evt, ConnectionCloseOkBody.createMethodBody((byte)0, (byte)9)); try { protocolSession.closeSession(); @@ -62,9 +66,5 @@ public class ConnectionCloseMethodHandler implements StateAwareMethodListener<C { _logger.error("Error closing protocol session: " + e, e); } - // AMQP version change: Hardwire the version to 0-9 (major=0, minor=9) - // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. - // Be aware of possible changes to parameter order as versions change. - protocolSession.writeResponse(evt, ConnectionCloseOkBody.createMethodBody((byte)0, (byte)9)); } } |
