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

Ron Sigal ron_sigal at yahoo.com
Fri May 18 22:42:29 EDT 2007


  User: rsigal  
  Date: 07/05/18 22:42:29

  Modified:    src/main/org/jboss/remoting/transport/socket  Tag:
                        remoting_2_x ServerThread.java
  Log:
  JBREM-714: (1) Added special handling for VersionedMarshaller/VersionedUnMarshaller; (2) for version == 1, socket.check_connection defaults to true.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.29.2.21 +18 -4     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.20
  retrieving revision 1.29.2.21
  diff -u -b -r1.29.2.20 -r1.29.2.21
  --- ServerThread.java	20 Mar 2007 03:18:42 -0000	1.29.2.20
  +++ ServerThread.java	19 May 2007 02:42:29 -0000	1.29.2.21
  @@ -34,6 +34,8 @@
   import org.jboss.remoting.marshal.MarshalFactory;
   import org.jboss.remoting.marshal.Marshaller;
   import org.jboss.remoting.marshal.UnMarshaller;
  +import org.jboss.remoting.marshal.VersionedMarshaller;
  +import org.jboss.remoting.marshal.VersionedUnMarshaller;
   
   import java.io.EOFException;
   import java.io.IOException;
  @@ -64,7 +66,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.20 $
  + * @version $Revision: 1.29.2.21 $
    */
   public class ServerThread extends Thread
   {
  @@ -145,6 +147,10 @@
            {
               shouldCheckConnection = Boolean.valueOf(checkValue).booleanValue();
            }
  +         else if (Version.getDefaultVersion() == Version.VERSION_1)
  +         {
  +            shouldCheckConnection = true;
  +         }
         }
      }
   
  @@ -516,7 +522,8 @@
   
            if(version == -1)
            {
  -            version = Version.VERSION_1;
  +//            version = Version.VERSION_1;
  +            throw new EOFException();
            }
         }
   
  @@ -638,7 +645,11 @@
            {
               if(trace) { log.trace("blocking to read invocation from unmarshaller"); }
   
  -            Object o = unmarshaller.read(inputStream, null);
  +            Object o = null;
  +            if (unmarshaller instanceof VersionedUnMarshaller)
  +               o = ((VersionedUnMarshaller)unmarshaller).read(inputStream, null, version);
  +            else
  +               o = unmarshaller.read(inputStream, null);
   
               if(trace) { log.trace("read " + o + " from unmarshaller"); }
   
  @@ -777,6 +788,9 @@
            case Version.VERSION_2:
            case Version.VERSION_2_2:
            {
  +            if (marshaller instanceof VersionedMarshaller)
  +               ((VersionedMarshaller) marshaller).write(resp, outputStream, version);
  +            else
               marshaller.write(resp, outputStream);
               if (trace) { log.trace("wrote response to the output stream"); }
               return;
  
  
  



More information about the jboss-cvs-commits mailing list