[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/socket ...

Ron Sigal ron_sigal at yahoo.com
Fri Jul 6 02:15:01 EDT 2007


  User: rsigal  
  Date: 07/07/06 02:15:01

  Modified:    src/main/org/jboss/remoting/transport/socket  Tag:
                        remoting_2_x ServerThread.java
  Log:
  JBREM-706:  Write null response for client side oneway invocation.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.29.2.22 +13 -3     JBossRemoting/src/main/org/jboss/remoting/transport/socket/ServerThread.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServerThread.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/socket/ServerThread.java,v
  retrieving revision 1.29.2.21
  retrieving revision 1.29.2.22
  diff -u -b -r1.29.2.21 -r1.29.2.22
  --- ServerThread.java	19 May 2007 02:42:29 -0000	1.29.2.21
  +++ ServerThread.java	6 Jul 2007 06:15:01 -0000	1.29.2.22
  @@ -31,6 +31,7 @@
   import org.jboss.remoting.Version;
   import org.jboss.remoting.Client;
   import org.jboss.remoting.serialization.ClassLoaderUtility;
  +import org.jboss.remoting.invocation.OnewayInvocation;
   import org.jboss.remoting.marshal.MarshalFactory;
   import org.jboss.remoting.marshal.Marshaller;
   import org.jboss.remoting.marshal.UnMarshaller;
  @@ -66,7 +67,7 @@
    * @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    *
  - * @version $Revision: 1.29.2.21 $
  + * @version $Revision: 1.29.2.22 $
    */
   public class ServerThread extends Thread
   {
  @@ -570,7 +571,7 @@
   
         Thread.interrupted(); // clear interrupted state so we don't fail on socket writes
   
  -      if(isOneway(req.getRequestPayload()))
  +      if(isServerSideOneway(req))
         {
            if(trace) { log.trace("oneway request, writing no reply on the wire"); }
         }
  @@ -589,6 +590,9 @@
               writeVersion(outputStream, version);
            }
   
  +         if (isOneway(req))
  +            resp = null;
  +         
            versionedWrite(outputStream, invoker, this.getClass().getClassLoader(), resp, version);
         }
   
  @@ -716,9 +720,15 @@
         return serverSocketWrapper;
      }
   
  -   private boolean isOneway(Map metadata)
  +   private boolean isServerSideOneway(InvocationRequest invocationRequest)
  +   {
  +         return invocationRequest.getParameter() instanceof OnewayInvocation;
  +   }
  +      
  +   private boolean isOneway(InvocationRequest invocationRequest)
      {
         boolean isOneway = false;
  +      Map metadata = invocationRequest.getRequestPayload();
   
         if (metadata != null)
         {
  
  
  



More information about the jboss-cvs-commits mailing list