Hi Duzayak (?),

the MultiThreadedHCM is called so because it allows
for multiple threads to use the same HttpClient. It has
to be used if the application is multithreaded.

The connection pool limits the number of simultaneous
connections, to a particular host and in general. It keeps
resource usage in check. Also, if there are many requests
to the same host, open connections may be reused,
which avoids the overhead of establishing a new
connection for each request.
If you want to know how it works, feel free to look at
the source code. It's open :-)

cheers,
  Roland





Cabbar Duzayak <[EMAIL PROTECTED]>
12.05.2004 12:26
Please respond to "Commons HttpClient Project"
 
        To:     Commons HttpClient Project 
<[EMAIL PROTECTED]>
        cc: 
        Subject:        Re: HttpClient initialization, when/where?


Can you please elaborate a bit how this connection
pool and multithreaded HCM work? Cause, given that
httpclient will be executed within my thread, why do
we need a multithreaded HCM? Also, connection pool is
used for sharing connections between threads? How
exactly does it work, what does it improve?

Thanks a lot for the information!



Reply via email to