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

Ron Sigal ron_sigal at yahoo.com
Thu Aug 30 13:22:44 EDT 2007


  User: rsigal  
  Date: 07/08/30 13:22:44

  Modified:    src/main/org/jboss/remoting/transport/socket  Tag:
                        remoting_2_x MicroSocketClientInvoker.java
  Log:
  JBREM-775:  Synchronized reference to pool in initPool().
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.16.2.34 +19 -4     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.33
  retrieving revision 1.16.2.34
  diff -u -b -r1.16.2.33 -r1.16.2.34
  --- MicroSocketClientInvoker.java	11 Jul 2007 00:35:03 -0000	1.16.2.33
  +++ MicroSocketClientInvoker.java	30 Aug 2007 17:22:44 -0000	1.16.2.34
  @@ -40,7 +40,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.33 $
  + * @version $Revision: 1.16.2.34 $
    */
   public class MicroSocketClientInvoker extends RemoteClientInvoker
   {
  @@ -559,6 +559,9 @@
            }
            catch (Exception e)
            {
  +//            if (bailOut)
  +//               return null;
  +            
               throw new CannotConnectException(
                  "Can not get connection to server. Problem establishing " +
                  "socket connection for " + locator, e);
  @@ -758,11 +761,23 @@
            {
               pool = new LinkedList();
               connectionPools.put(address, pool);
  -            log.debug(this + " added new pool (" + pool + ") as " + address);
  +            if (trace)
  +            {
  +               synchronized (pool)
  +               {
  +                  log.trace(this + " added new pool (" + pool + ") as " + address);
  +               }
  +            }
            }
            else
            {
  -            log.debug(this + " using pool (" + pool + ") already defined for " + address);
  +            if (trace)
  +            {
  +               synchronized (pool)
  +               {
  +                  log.trace(this + " using pool (" + pool + ") already defined for " + address);
  +               }
  +            }
            }
         }
      }
  @@ -853,7 +868,7 @@
            }
            catch (Exception ex)
            {
  -            log.debug(this + " got Exception " + ex + ", creation attempt took " +
  +            log.debug(this + " got Exception " + ex + ", creation attempt " + i + " took " +
                     (System.currentTimeMillis() - timestamp) + " ms");
   
               synchronized(usedPoolLock)
  
  
  



More information about the jboss-cvs-commits mailing list