You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by mb...@apache.org on 2003/07/23 03:28:02 UTC
cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient MultiThreadedHttpConnectionManager.java
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