Re: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-24 Thread Stefan Magnus Landrø
I prefer this code-style: client.execute(new HttpGet(), response -> { return response.getAllHeaders(); } ); The response handler will clean up everything. 2015-04-24 13:57 GMT+02:00 Oleg Kalnichevski : > On Fri, 2015-04-24 at 13:22 +0200, Joan Balagueró wrote: > > Hello, > > > > Regarding th

Re: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-24 Thread Oleg Kalnichevski
On Fri, 2015-04-24 at 13:22 +0200, Joan Balagueró wrote: > Hello, > > Regarding this posts: > > > Any help in this issue would be much appreciated. > > Thanks > > mrhuang > > > > > I am not quite sure I understand the issue. You should not even be using > > #releaseConnection in the first pla

RE: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-24 Thread Joan Balagueró
Hello, Regarding this posts: > Any help in this issue would be much appreciated. > Thanks > mrhuang > > I am not quite sure I understand the issue. You should not even be using > #releaseConnection in the first place. It is provided for compatibility with > HC 3.x. You should always close Cl

Re: Re:Re: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-24 Thread Oleg Kalnichevski
On Fri, 2015-04-24 at 10:53 +0800, qustmrhu...@163.com wrote: > I see the code about response close. AbortConnection not releaseConnection > ,so the connection can be re-used.I am confused how the connection be re-used. > public void close() throws IOException { > if (this.connHolder != n

Re:Re: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-23 Thread qustmrhu...@163.com
I see the code about response close. AbortConnection not releaseConnection ,so the connection can be re-used.I am confused how the connection be re-used. public void close() throws IOException { if (this.connHolder != null) { this.connHolder.abortConnection(); } }

Re: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-23 Thread Oleg Kalnichevski
On Thu, 2015-04-23 at 09:41 +0800, qustmrhu...@163.com wrote: > > Hi,i use PoolingHttpClientConnectionManager with httpclient4.4 . > I see the code in MainClientExec.java,but i can't understand . > > > > > The respone entity is always not null and is stream,so the releaseConnection > method c

Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-22 Thread qustmrhu...@163.com
Hi,i use PoolingHttpClientConnectionManager with httpclient4.4 . I see the code in MainClientExec.java,but i can't understand . The respone entity is always not null and is stream,so the releaseConnection method cant be invoked always. final HttpEntity entity = response.getEntity(); if (