Hi. I'm developing a Swing client application for requesting a web application (Struts2).
This client application is required to deal with concurrent requests (SwingWorkers) that will finally be performed using HttpClient4. All request will have the same URL: "http://www.myhost.com/mywebapp", only query string will change: "http://www.myhost.com/mywebapp/myrequest?myparam=myvalue". The application must be session aware (JSESSIONID cookie) and possibly will require to generally manage some other HTTP state. My questions: 1. Should I share the same HttpClient instance for all requests (concurrent or not)? Or should I instantiate a new HttpClient for every new request (concurrent or not)? 2. Should I use a 'ThreadSafeClientConnManager as stated in http://hc.apache.org/httpcomponents-client-4.0.3/tutorial/html/connmgmt.html#d4e629 ? Or using a new HttpClient instance for every concurrent request is enough? Thanks and regards. Antonio. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
