[jboss-cvs] JBoss Messaging SVN: r2023 - in trunk: src/main/org/jboss/jms/server/remoting and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jan 23 05:00:13 EST 2007


Author: ovidiu.feodorov at jboss.com
Date: 2007-01-23 05:00:12 -0500 (Tue, 23 Jan 2007)
New Revision: 2023

Modified:
   trunk/lib/jboss-remoting.jar
   trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-773

Modified: trunk/lib/jboss-remoting.jar
===================================================================
(Binary files differ)

Modified: trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java	2007-01-23 09:46:32 UTC (rev 2022)
+++ trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java	2007-01-23 10:00:12 UTC (rev 2023)
@@ -32,6 +32,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.HashMap;
 
 import javax.jms.Message;
 
@@ -53,6 +54,7 @@
 import org.jboss.messaging.core.plugin.IDBlock;
 import org.jboss.remoting.InvocationRequest;
 import org.jboss.remoting.InvocationResponse;
+import org.jboss.remoting.Client;
 import org.jboss.remoting.callback.Callback;
 import org.jboss.remoting.invocation.InternalInvocation;
 import org.jboss.remoting.invocation.OnewayInvocation;
@@ -114,6 +116,8 @@
 
 
    // Static ---------------------------------------------------------------------------------------
+
+   private static Map ONE_WAY_METADATA;
    
    public static void setUsingJBossSerialization(boolean b)
    {
@@ -143,6 +147,12 @@
             "UNKNOWN";
    }
 
+   static
+   {
+      ONE_WAY_METADATA = new HashMap();
+      ONE_WAY_METADATA.put(Client.ONEWAY_FLAG, "true");
+   }
+
    // Attributes -----------------------------------------------------------------------------------
 
    protected boolean trace;
@@ -479,7 +489,7 @@
             }         
             else if (res instanceof IDBlock)
             {
-               //Return value from getMessageNow
+               // Return value from getMessageNow
                dos.write(ID_BLOCK_RESPONSE);
    
                IDBlock block = (IDBlock)res;
@@ -492,7 +502,7 @@
             }
             else if (res instanceof JBossMessage)
             {
-               //Return value from browsing message
+               // Return value from browsing message
                dos.write(BROWSE_MESSAGE_RESPONSE);
                
                JBossMessage msg = (JBossMessage)res;
@@ -507,7 +517,7 @@
             }            
             else if (res instanceof Message[])
             {
-               //Return value from browsing messages
+               // Return value from browsing messages
                dos.write(BROWSE_MESSAGES_RESPONSE);
                
                Message[] msgs = (Message[])res;
@@ -661,11 +671,16 @@
                
                mi.setArguments(args);
 
+               // the remoting server requires us to "mark" an one-way invocation redundantly once
+               // by wrapping an OnewayInvocation within an InvocationRequest, and then placing
+               // a Client.ONEWAY_FLAG in the same InvocationRequest's metadata. Why?
+
                OnewayInvocation oi = new OnewayInvocation(new MessagingMarshallable(version, mi));
-                  
+
+
                InvocationRequest request =
                   new InvocationRequest(null, ServerPeer.REMOTING_JMS_SUBSYSTEM,
-                                        oi, null, null, null);
+                                        oi, ONE_WAY_METADATA, null, null);
    
                if (trace) { log.trace("read changeRate()"); }
    




More information about the jboss-cvs-commits mailing list