hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "linea@libero.it" <li...@libero.it>
Subject Re: ConnectionTimeoutException doesn't releaseConnection()
Date Fri, 12 Sep 2003 11:40:53 GMT
Hi,
this is the pattern I use:

Try {
      method.execute(...);
      method.getResponseBodyAsString();
  } catch (Exception e) {
      ...
  } finally {
      method.releaseConnection();
      LOG.info("RELEASED");	
  }

The following log shows that no actual release is performed, even if the message 
"RELEASED" still appears..instead,the same pattern works for SocketTimeoutException.
Thanks again

7955   DEBUG [TimeoutCheck1] httpclient.HttpConnection - enter 
HttpConnection.readLine()
10544  DEBUG [MainCheck2] httpclient.HttpConnection - enter 
HttpConnection.isResponseAvailable(int)
10930  WARN  [MainCheck1] httpclient.HttpConnection - The host 
www.pccomputing.com:80 (or proxy nul
l:-1) did not accept the connection within timeout of 3000 milliseconds
10931  WARN  [MainCheck1] CheckPerformer - Connection Timeout occurred..
org.apache.commons.httpclient.HttpConnection$ConnectionTimeoutException
         at 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:659)
         at 
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.o
pen(MultiThreadedHttpConnectionManager.java:957)
         at 
org.apache.commons.httpclient.HttpMethodDirector.establishValidOpenConnection(HttpMethod
Director.java:253)
         at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethodForHost(HttpMethodDirector
.java:306)
         at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:1
43)
         at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:378)
         at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:268)
         at CheckPerformer.checkUrl(PersistenceCheck.java:557)
         at PersistenceCheck$MainCheck.run(PersistenceCheck.java:306)
10932  INFO  [MainCheck1] CheckPerformer - RELEASED

Here still no releaseConnection()




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


Mime
View raw message