You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/03/14 17:05:51 UTC

svn commit: r518198 - in /incubator/qpid/branches/qpid.0-9: ./ gentools/templ.java/MethodBodyClass.tmpl java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java

Author: aconway
Date: Wed Mar 14 09:05:50 2007
New Revision: 518198

URL: http://svn.apache.org/viewvc?view=rev&rev=518198
Log:
Recorded rollback of revisions 492756 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid

Modified:
    incubator/qpid/branches/qpid.0-9/   (props changed)
    incubator/qpid/branches/qpid.0-9/gentools/templ.java/MethodBodyClass.tmpl
    incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java

Propchange: incubator/qpid/branches/qpid.0-9/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Mar 14 09:05:50 2007
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid:1-492620,492636,492641,492756,493126-493151,494540,494553,494587,495629,495661,496317,496665,496678,497341,497439,498591,499049,499374,499803,499845
+/incubator/qpid/trunk/qpid:1-492620,492636,492641,493126-493151,494540,494553,494587,495629,495661,496317,496665,496678,497341,497439,498591,499049,499374,499803,499845

Modified: incubator/qpid/branches/qpid.0-9/gentools/templ.java/MethodBodyClass.tmpl
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/gentools/templ.java/MethodBodyClass.tmpl?view=diff&rev=518198&r1=518197&r2=518198
==============================================================================
--- incubator/qpid/branches/qpid.0-9/gentools/templ.java/MethodBodyClass.tmpl (original)
+++ incubator/qpid/branches/qpid.0-9/gentools/templ.java/MethodBodyClass.tmpl Wed Mar 14 09:05:50 2007
@@ -153,16 +153,28 @@
         return buf.toString();
     }
 
-    public static AMQFrame createAMQFrame(int _channelId, byte major, byte minor
+    public static ${CLASS}${METHOD}Body createMethodBody(byte major, byte minor
 %{FLIST}    ${mb_field_parameter_list}
                                          )
     {
-        ${CLASS}${METHOD}Body body = new ${CLASS}${METHOD}Body(major, minor);
-%{FLIST}    ${mb_field_body_initialize}
+        return createMethodBody(major, minor, getClazz(major, minor), getMethod(major, minor)
+%{FLIST}    ${mb_field_passed_parameter_list}
+        );
+    }
         		 
-        AMQFrame frame = new AMQFrame();
-        frame.channel = _channelId;
-        frame.bodyFrame = body;
-        return frame;
+    public static ${CLASS}${METHOD}Body createMethodBody(byte major, byte minor, int clazzID, int methodID
+%{FLIST}    ${mb_field_parameter_list}
+                                         )
+    {
+        return new ${CLASS}${METHOD}Body(major, minor, clazzID, methodID
+%{FLIST}    ${mb_field_passed_parameter_list}
+        );
+    }
+
+    public ${CLASS}${METHOD}Body copy()
+    {
+        return new ${CLASS}${METHOD}Body(major, minor, getClazz(major, minor), getMethod(major, minor)
+%{FLIST}    ${mb_field_passed_parameter_list}
+        );
     }
 }

Modified: incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java?view=diff&rev=518198&r1=518197&r2=518198
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java Wed Mar 14 09:05:50 2007
@@ -253,14 +253,14 @@
 
                 String locales = "en_US";
                 // Interfacing with generated code - be aware of possible changes to parameter order as versions change.
-                AMQFrame response = ConnectionStartBody.createAMQFrame((short) 0,
-            		_major, _minor,	// AMQP version (major, minor)
+                AMQMethodBody connectionStartBody = ConnectionStartBody.createMethodBody
+                    ((byte)_major, (byte)_minor,	// AMQP version (major, minor)
                     locales.getBytes(),	// locales
                     mechanisms.getBytes(),	// mechanisms
                     null,	// serverProperties
                 	(short)_major,	// versionMajor
                     (short)_minor);	// versionMinor
-                _minaProtocolSession.write(response);
+                writeRequest(0, connectionStartBody, _stateManager);
             }
             catch (AMQException e)
             {