Puneet Lakhina wrote: > public void run() { > > HttpClient client = new HttpClient(); > PostMethod postMethod = new PostMethod(sameURL); > /*Set parameters in post method*/ > client.executeMethod(); > /*Do something with the response*/ > postMethod.releaseConnection(); > }
This will leak a connection for every request, until they are released by garbage collection. > I am a little confused as to how the connection management takes place. > Should i be using the same HttpClient object across different threads? > Should I be in that case using the MultiThreadedConnectionManager? Yes and yes. You are looking for the Threading Guide: http://jakarta.apache.org/httpcomponents/httpclient-3.x/threading.html hope that helps, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]