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 Re: connectionManager.releaseConnection()
Date Wed, 30 Mar 2005 13:50:16 GMT
Hi Ortwin.

As you say it should be probably worth providing a multithreaded
non-pooling connection manager with the HttpClient dist.

Right now I think I am not able to implement a new Connection manager to
fit my needs. I guess that after some effort inspecting the source code
I could develop my own class with success. The problem is I don't have
enough time to do it, so I would like to find an intermediate solution.

I'm thinking about using the "Connection: close" header in my request,
but some questions arise:

 - Can I trust in this mechanism to have HttpClient close every
connection after calling method.releaseConnection()?

 - If this is not completely true, in what situations will this header 
do the job? What are the main drawbacks of this solution?

Thank you for your help. 


> Juan,
> 
> while this completely defeats the purpose of the HTTP keep-alive 
> feature, I understand that there are special situations when one needs 
> what you describe. That means you can do away with the connection 
> pooling altogether. It also means that none of the existing 
> ConnectionManager implementatinos suite your needs. You had better 
> implementing a completely new ConnectionManager that does not attempt to 
> pool a connection but every call to getConnection just creates a new one 
> and every call to releaseConnection just closes it. This should be very 
> easy to do. Maybe we should provide such a simple non-pooling connection 
> manager with the stock version of HttpClient.
> 

-- 
Juan Pedro López Sáez
ALTIRIA TIC, Soluciones en Servicios Móviles
Tlf: 913 311 198
Móvil: 610 258 837
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