summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-01-25 19:23:39 +0000
committerRafael H. Schloming <rhs@apache.org>2007-01-25 19:23:39 +0000
commit3335bfa2ddc5c83890b967792fb2442ee0680b83 (patch)
tree5d743e375613b0172f49b97cb9c4fd75fc20c8fa
parent97578951e5a0eb710ad97799f6f22a45f7769b8c (diff)
downloadqpid-python-3335bfa2ddc5c83890b967792fb2442ee0680b83.tar.gz
updated to use session's new close method
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@499929 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java24
1 files changed, 5 insertions, 19 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java b/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
index badb523786..7716ec0d75 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
@@ -192,25 +192,11 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed
*/
public void closeConnection() throws JMException
{
-
- // 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.
- final AMQMethodBody request = ConnectionCloseBody.createMethodBody
- ((byte)0, (byte)9, // AMQP version (major, minor)
- 0, // classId
- 0, // methodId
- AMQConstant.REPLY_SUCCESS.getCode(), // replyCode
- "Broker Management Console has closing the connection." // replyText
- );
- try
- {
- if (true) throw new Error("XXX");
- _session.writeRequest(0, request, null /*XXX*/);
- _session.closeSession();
- }
- catch (AMQException ex)
- {
+ try {
+ _session.closeSessionRequest
+ (AMQConstant.REPLY_SUCCESS.getCode(), // XXX: Success???
+ "Broker Management Console has closing the connection.");
+ } catch (AMQException ex) {
throw new MBeanException(ex, ex.toString());
}
}