hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Pedro López Sáez <j...@altiria.com>
Subject Change maxConnectionsPerHost
Date Fri, 14 Jul 2006 17:42:10 GMT
Hi all.

I have to use HttpClient in an environment where maxConnectionsPerHost
must change during normal operation, just to implement a kind of flow
control.

When this value is decreased, in case current connectionsInPool number
is greater than the new maxConnectionsPerHost, available connections are
still greater than the maximum set, so the flow control doesn't work.

It would be great if connections in pool were deleted util
maxConnectionsPerHost is reached when releaseConnection is called,
instead of freeing connections.

I guess that could be done extending MultiThreadedConnectionManager with
a custom implementation to override releaseConnection(HttpConnection) to
call ConnectionPool.deleteConnection(HttpConnection) in case it's
needed.

The problem is ConnectionPool is a private member so it's not available
for derived classes. Any suggestion to get my aim at low cost?

Another related issue: I'd like to know at any time the real number of
connections in use. MultiThreadedConnectionManager.getConnectionsInPool
shows connections created in pool, but they could be in use or idle. Any
suggestions?

Thank you very much,

	Juan Pedro López 

 
-- 
Juan Pedro López Sáez
ALTIRIA TIC, Soluciones en Servicios Móviles

http://www.altiria.com


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


Mime
View raw message