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: ThreadSafeClientConnManager
Date Wed, 22 Sep 2010 14:59:01 GMT
On Tue, 2010-09-21 at 16:58 +0200, lists@joerg-buchberger.de wrote:
> Hi all.
> From httpclient documentation and mailing list I read, that ...
> a) one should use ThreadSafeClientConnManager, "if more than one thread is using
> the HttpClient"
> b) a SingleClientConnManager "ought to be used by one execution thread only"
> ... yet I'm not 100% sure, whether ...
> (a) above just means the case "where multiple threads share a particular
> _instance_ of DefaultHttpClient" as opposed to "when multiple threads use Apache
> http client lib in general" (even if each thread had its own DefaultHttpClient
> instance?)

That implies a particular instance of HttpClient shared by multiple
threads. However, users are generally advised to have only one instance
of HttpClient per distinct HTTP service.

> and whether (b) above means that "only one particular instance
> of SingleClientConnManager should be used within one thread" or whether it
> should be read as "there must be only one thread per runtime, that is making use
> of any SingleClientConnManager instance(s)"

The former. One generally should have one instance of
SingleClientConnManager per execution thread.

Hope this helps


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

View raw message