commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbe...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient MultiThreadedHttpConnectionManager.java
Date Wed, 23 Jul 2003 01:47:20 GMT
mbecke      2003/07/22 18:47:20

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH
                        MultiThreadedHttpConnectionManager.java
  Log:
  Added connection life-cycle debugging.
  PR: 21788
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.17.2.1  +10 -4     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
  
  Index: MultiThreadedHttpConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- MultiThreadedHttpConnectionManager.java	27 Jun 2003 03:20:32 -0000	1.17
  +++ MultiThreadedHttpConnectionManager.java	23 Jul 2003 01:47:20 -0000	1.17.2.1
  @@ -427,6 +427,9 @@
               if ((hostPool.numConnections < getMaxConnectionsPerHost()) 
                   && (numConnections < getMaxTotalConnections())) {
   
  +                if (LOG.isDebugEnabled()) {
  +                    LOG.debug("Allocating new connection for hostConfig: " + hostConfiguration);
  +                }
                   connection = new HttpConnection(hostConfiguration);
                   connection.setHttpConnectionManager(MultiThreadedHttpConnectionManager.this);
                   numConnections++;
  @@ -475,6 +478,9 @@
               if (hostPool.freeConnections.size() > 0) {
                   connection = (HttpConnection) hostPool.freeConnections.removeFirst();
                   freeConnections.remove(connection);
  +                if (LOG.isDebugEnabled()) {
  +                    LOG.debug("Getting connection for hostConfig: " + hostConfiguration);
  +                }
               }
               return connection;
           }
  @@ -569,7 +575,7 @@
               HostConfiguration connectionConfiguration = configurationForConnection(conn);
   
               if (LOG.isDebugEnabled()) {
  -                LOG.debug("Freeing connection: " + conn);
  +                LOG.debug("Freeing connection for hostConfig: " + connectionConfiguration);
               }
   
               synchronized (this) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message