Will McQueen wrote:
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


Hi Will

Both approaches are perfectly valid, but I would recommend the latter (one connection manager).

Oleg



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



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

Reply via email to