On Jul 9, 2014, at 5:16 AM, Francesco Chicchiriccò <[email protected]> wrote:

> On 09/07/2014 10:45, Francesco Chicchiriccò wrote:
> 
> It seems I've over-simplified the snippet above: it should have been, actually
> 
> WebClient client = ...;
> Response response = client.invoke(method, inputStream);
> client.close();
> response.getEntity();
> 
> It seems that with CXF 3.0.0 closing a client implies also closing the 
> response object, thus causing the exception above: correct?

Even with Sergey’s change, I wouldn’t rely on this.   Closing the client SHOULD 
result in the transport being shut down.   For the default URLConnection  based 
transport, that doesn’t really do anything so the InputStream would still be 
valid.  For the async http clients, this could result in the thread pools and 
listeners and everything being shutdown and thus nothing would be listening for 
any more data to come in.   


-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to