hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andres Rangel" <andr...@corp.moniker.com>
Subject Miltiple Independent connection to the same Host
Date Thu, 07 Oct 2010 15:11:05 GMT

I am in the process of  redesigning a multithreaded application that is
doing XML over http  using httpclient vr 4


We currently have a pool of threads, and each one opens and closes the
connection all the time (we are using commons-http)


We have a restriction of X number of request per connection before
closing it (which we have ignored, since we are opening and closing it
all the time)


My question is the following:


I know that using ThreadSafeClientConnManager the client can be shared
across multiple threads, but is not the case here, since each thread
will have it's own connection.


How can I reuse the connection in each thread?


Do I keep the HttpClient in a local variable and just reuse it inside
each thread?



Andres Rangel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message