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

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Wed, 13 Feb 2013 18:18:01 +0100

I've just added the wording. Please let me know if you think that wording should be reverted. Personally I do not see the use case for not doing the automatic close.


On Feb 13, 2013, at 5:52 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:

> 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