On 08/02/07, Steve Terrell <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to