> Please clarify the following. > > 1) Do I need to instantiate "HttpClient" only once? (using Singleton). >
You should. There's nothing wrong with having multiple HttpClient instances, but we generally recommend having only a single one > 2) Can I use MultiThreadedHttpConnectionManager in this scenario? > Since I'm hitting only same host all the time, I do not know how to > use this. Could you please give an example. (I want concurrent user > requests executed in multi threading manner. ) > You must. SimpleHttpConnectionManager used per default is NOT thread-safe. Regardless how many hosts you intent to hit, you have to use MultiThreadedHttpConnectionManager when accessing HttpClient from multiple threads. For details refer to the HttpClient multithreading guide: http://jakarta.apache.org/commons/httpclient/threading.html Hope this helps Oleg > Thank you, > Vijay > > --------------------------------------------------------------------- > 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]