[jsr339-experts] Re: [jax-rs-spec users] always close Response after InvocationCallback?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 13 Feb 2013 16:52:54 +0000

On 12/02/13 18:24, Bill Burke wrote:
> On 2/12/2013 9:25 AM, Santiago Pericas-Geertsen wrote:
>> On Feb 11, 2013, at 3:07 PM, Bill Burke <bburke_at_redhat.com> wrote:
>>> I think it might be wise to put language in the InvocationCallback
>>> interface javadoc that states that when a completed() or failed()
>>> method is finished, the underlying Response object will be closed().
>>> This will save the user from having to write a lot of boilerplate
>>> code to make sure the Response object is closed.
>> Could you file a JIRA for this? Thx.
> So you agree? I kept trying to think of a reason why InvocationCallback
> *shouldn't* close the response. I thought any use case requiring
> response to be left open should probably be implemented using Futures
> instead of callbacks.
Actually, perhaps indeed some more thought should be given to it before
requiring an implicit close

Cheers, Sergey