2015-08-02 23:12 GMT+02:00 Sergey Beryozkin <sberyoz...@gmail.com>:
> Hi
> Can you cast a proxy to WebClient (via its utility method
> WebClient.client()) and close it, and also enable the auto-closure of the
> Response ?
> Sergey

Hi

I'm using CXF 2.7.8 to invoke REST services by WebClient API & JAX-RS
Client Proxy-based API
Is required to call explicitly close() method in WebClient ?
Anyway I would like to keep alive some TCP connection ( default value
) . I wonder in which cases i should set auto-closure or call
explicitly close()

I'm already calling reset() method for cleaning thread-local info ( I guess  )



Thanks


>
> On 31/07/15 02:59, Xiaobin wrote:
>>
>> Hi guys,
>>
>> I am using CXF 2.7.5. I have an application using JAXRSClientFactoryBean
>> to
>> generate proxy, and use following code to close client when it is done:
>>
>> ClientConfiguration config = WebClient.getConfig(root);
>>      HTTPConduit conduit = config.getHttpConduit();
>>      if (conduit == null) {
>>        throw new IllegalArgumentException();
>>      }
>>      conduit.close();
>>
>> As time goes on, I noticed that there are many connections shown by
>> netstat
>> in CLOSE_WAIT state.
>>
>> I understand that because of CXF-5144, it won't be able to re-use
>> connections. But besides this, is there anything I can do with those
>> CLOSE_WAIT connections ? Are these going to time out eventually or ?
>>
>> Also, I am wondering if setting ConnectionType.CLOSE would help ?
>>
>> Look forward to your suggestions! Thanks in advance.
>>
>>
>> -Xiaobin
>>
>

Reply via email to