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

Ron Sigal ron_sigal at yahoo.com
Wed Jan 31 03:20:04 EST 2007


  User: rsigal  
  Date: 07/01/31 03:20:04

  Modified:    src/main/org/jboss/remoting/transport/socket  Tag:
                        remoting_2_x MicroSocketClientInvoker.java
  Log:
  JBREM-598: Pass temp timeout in to ClientSocketWrapper constructor to use during object stream construction.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.16.2.18 +13 -8     JBossRemoting/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MicroSocketClientInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java,v
  retrieving revision 1.16.2.17
  retrieving revision 1.16.2.18
  diff -u -b -r1.16.2.17 -r1.16.2.18
  --- MicroSocketClientInvoker.java	31 Jan 2007 03:58:02 -0000	1.16.2.17
  +++ MicroSocketClientInvoker.java	31 Jan 2007 08:20:04 -0000	1.16.2.18
  @@ -35,7 +35,7 @@
    * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    *
  - * @version $Revision: 1.16.2.17 $
  + * @version $Revision: 1.16.2.18 $
    */
   public class MicroSocketClientInvoker extends RemoteClientInvoker
   {
  @@ -503,7 +503,7 @@
         {
            try
            {
  -            socketWrapper = getConnection(marshaller, unmarshaller);
  +            socketWrapper = getConnection(marshaller, unmarshaller, tempTimeout);
            }
            catch (Exception e)
            {
  @@ -561,11 +561,6 @@
   
               end = System.currentTimeMillis() - start;
               readTime += end;
  -
  -            if (tempTimeout >= 0)
  -            {
  -               socketWrapper.setTimeout(savedTimeout);
  -            }
            }
            catch (SocketException sex)
            {
  @@ -608,6 +603,13 @@
               }
               return handleException(ex, socketWrapper);
            }
  +         finally
  +         {
  +            if (tempTimeout >= 0)
  +            {
  +               socketWrapper.setTimeout(savedTimeout);
  +            }
  +         }
   
            // call worked, so no need to retry
            break;
  @@ -678,7 +680,9 @@
         }
      }
   
  -   protected SocketWrapper getConnection(Marshaller marshaller, UnMarshaller unmarshaller)
  +   protected SocketWrapper getConnection(Marshaller marshaller,
  +                                         UnMarshaller unmarshaller,
  +                                         int tempTimeout)
         throws Exception
      {
         SocketWrapper pooled = null;
  @@ -752,6 +756,7 @@
                  }
                  metadata.put(SocketWrapper.MARSHALLER, marshaller);
                  metadata.put(SocketWrapper.UNMARSHALLER, unmarshaller);
  +               metadata.put(SocketWrapper.TEMP_TIMEOUT, new Integer(tempTimeout));
   
                  pooled = createClientSocket(socket, address.timeout, metadata);
                  usedPooled++;
  
  
  



More information about the jboss-cvs-commits mailing list