hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: My HostConfiguration (including a customized SocketFactory) gets replaced with a default one
Date Sat, 21 Jan 2006 12:31:06 GMT
Alex Cruise wrote:
> Oleg Kalnichevski wrote:
> 
>> Do not use absolute URLs when explicitly specifying an instance of 
>> HostConfiguration. An absolute URL will always override the 
>> HostConfiguration settings.
> 
> 
> OK, thanks, my TrustManager is working now with 3.0.  I still have the 
> CLOSE_WAIT problem though.  In your opinion, should 
> connectionManager.releaseConnection() eventually result in the closure 
> of the Socket?
> 
Alex,

The sole purpose of this method is to release the connection used by the 
method back to the connection manager, hence the name. It is entirely up 
to the connection manager to decide whether to keep the connection alive 
or drop it.

Both standard connection managers (the multithreaded one and simple one) 
always keep connections alive whenever possible. If you do not want 
connections kept open indefinitely, set up an idle connection handler to 
enforce an connection closure policy of a sort:

http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/util/IdleConnectionHandler.html
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.html

Hope this helps

Oleg

> -0xe1a
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message