On Thu, 2010-10-14 at 09:20 -0700, Antonio Sanchez wrote:
> Thanks Oleg.
> 
> 
> olegk wrote:
> > 
> > You should be re-using the same instance of HttpClient
> > 
> 
> Do I need to synchronize access to the HttpClient instance?
> 

No, you do not. DefaultHttpClient is fully thread-safe *as long as* all
dependent interface implementations (connection manager, auth handlers,
redirect strategy, keep alive strategy and so on) injected by the user
are thread-safe. 

> 
> olegk wrote:
> > 
> > You should be using the same instance of pooling connection manager such
> > as ThreadSafeClientConnManager for all requests.
> > 
> 
> How does ThreadSafeClientConnManager work? Does it just synchronize the
> management of internal connection resources? Or does it behaves in a true
> concurrent fashion having multiple transfers at the very same time though my
> one HttpClient instance?
> 

It is the latter. Feel free to review the source, though, to form an
opinion.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to