You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2007/01/25 20:23:40 UTC

svn commit: r499929 - /incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java

Author: rhs
Date: Thu Jan 25 11:23:39 2007
New Revision: 499929

URL: http://svn.apache.org/viewvc?view=rev&rev=499929
Log:
updated to use session's new close method

Modified:
    incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java

Modified: incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java?view=diff&rev=499929&r1=499928&r2=499929
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java Thu Jan 25 11:23:39 2007
@@ -192,25 +192,11 @@
      */
     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());
         }
     }