hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will McQueen <willmcqu...@yahoo.com>
Subject MultiThreadedHttpConnectionManager used by multiple HttpClient's?
Date Mon, 09 Feb 2009 09:28:44 GMT

Hi,

Is a singe instance of MultiThreadedHttpConnectionManager designed to be used with more than
one HttpClient? eg:


MultiThreadedHttpConnectionManager connMgr = new MultiThreadedHttpConnectionManager(); //used
with both client1 and client2

HttpClient client1 = new HttpClient();
client1.setHttpConnectionManager(connMgr);

HttpClient client2 = new HttpClient();
client1.setHttpConnectionManager(connMgr);


I'd like to run heavily multithreaded tests against 3 diff't hosts with HttpClient, interleaved.
Is it common practice to give each target host its own HttpClient (which in turn has its own
MT connMgr)? Or, is it common to pass-in a diff't hostConfig for each method execution, like
this:
client.executeMethod(hostConfig, httpMethod, httpState);

Thank you.

Cheers,
Will


      

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


Mime
View raw message