sebb wrote: > We are using HttpClient in Apache JMeter. > This uses multiple threads to simulate multiple users. > > We don't use HttpClient and a Connection Manager, as we specifically > don't want to share connections between threads. Instead, we create > our own HttpConnection objects and pass these to > > method.execute(state.connection). > > I'm now wondering whether this is a sensible approach? > > Perhaps we are missing out by not using a method such as: > > httpClient.executeMethod(method) > > I would have expected the two approaches to be much the same, but on > looking at the latter, this is handled via HttpMethodDirector, which > seems to do rather more than method.execute() does. > > Should we be using a customised ConnectionManager instead?
No need to use a customized ConnectionManager. Just create a separate instance of HttpClient for each thread. By default, HttpClient instances get a SimpleConnectionManager which uses a single connection. This will provide the thread separation you require, while allowing you to use httpClient.executeMethod. hope this helps, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
