hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Is this a good idea?
Date Thu, 08 Feb 2007 21:37:23 GMT
On 08/02/07, Steve Terrell <Steve.Terrell@guideworkstv.com> wrote:
> Folks,
>   I think I am losing an argument at work. A coworker is implementing
> some code that will be used to call a servlet. HttpClient is the tool of
> choice, of course. The code he is writing must handle multiple requests
> in parallel, thus he will be using the MultiThreadedConnectionManager.
> However, he is proposing to channel all his requests through a
> singleton.
>   I just don't see how that will work. I am convinced the singleton
> will have the effect of serializing the requests, since each request
> will only get processed when the singleton gets a time slice from the
> jvm. Am I nuts for thinking the singleton will be a bottleneck?

[Not sure this is strictly an HttpClient question]

Surely it depends on what the singleton is?

If the singleton is thread-safe without needing sychronisation, then
threads will not impede each other.

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

View raw message