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:28:02 GMT
mbecke      2003/07/22 18:28:02

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        MultiThreadedHttpConnectionManager.java
  Log:
  Added connection life-cycle debugging.
  PR: 21788
  
  Revision  Changes    Path
  1.21      +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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- MultiThreadedHttpConnectionManager.java	16 Jul 2003 20:48:27 -0000	1.20
  +++ MultiThreadedHttpConnectionManager.java	23 Jul 2003 01:28:02 -0000	1.21
  @@ -443,6 +443,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++;
  @@ -491,6 +494,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;
           }
  @@ -585,7 +591,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