On Wed, 2005-01-12 at 10:46 +0100, [EMAIL PROTECTED] wrote: > I m using your MultiThreadedHttpConnectionManager with satifaction :-) > > >What do you mean by "really released"? Closed? > > Yes "closed" and httpClient really free to be catch be the garbageCollector. > I could do "HttpClientObject=null;" but sometimes I need to reuse it. So I > use the method "HttpMethodeBase.releaseConnection()". >
Jeanremi, There are other options (1) You may want to implement a custom connection manager that force- closes connections upon release in the HttpConnectionManager#releaseConnection method. (2) This option is available in HttpClient 2.0 as of release 2.0.1. When you are done using HttpClient, call the shutdown method of the MultiThreadedHttpConnectionManager: http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.html#shutdown() Hope this helps Oleg > I think that I need the action of the method give in HttpClient3.0beta > "HttpMethodeBase.abort()" (I think anderstand that this one close the > connection directly on the level of the socket). But I do not want to use > beta version in my production version... > > jeanremi > -----Message d'origine----- > De : Oleg Kalnichevski [mailto:[EMAIL PROTECTED] > Envoy� : mardi 11 janvier 2005 22:52 > � : HttpClient Project > Objet : Re: HttpClient Stop the connection but release connection > uncertain > > > On Tue, 2005-01-11 at 16:20 +0100, [EMAIL PROTECTED] wrote: > > Hi, > > > > I use HttpClient2.0 in an application used to connect to several > > webservices. > > > > But, I meet a memory leak because connections create by the HttpClient's > > objects seem to be not releasy correctly. I read in the API that the > > HttpMethodeBase.releaseConnection() "NOT close the connection if it can be > > reused". > > > > So how can I be certain that the current httpClient and its connection is > > really released ? > > > > Jeanremi, > > What do you mean by "really released"? Closed? > > What connection manager are you using? Do you re-use HttpClient instance > or always create a new one per each request? > > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
