users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Remove @ManagedAsync Re: Re: Re: Latest async API changes

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 24 Sep 2012 18:30:59 +0100

On 24/09/12 18:25, Bill Burke wrote:
>
>
> On 9/24/2012 1:16 PM, Sergey Beryozkin wrote:
>> Hi
>> On 15/08/12 18:02, Marek Potociar wrote:
>>> Experts,
>>>
>>> While I disagree with most of what Bill is objecting to, I have not
>>> received any other real support for either side from you. So, since I do
>>> not feel strongly about having these features in JAX-RS now, to move out
>>> of this deadlock situation I have updated the async API proposal as
>>> follows:
>>>
>>> * removed all properties from @Suspended
>>> o the injected AsyncResponse is suspended indefinitely by default
>>> which may be changed using its programmatic API
>>> * removed ConnectionCallback from JAX-RS API
>>> * removed @ManagedAsync from JAX-RS API
>>> * added varargs versions of AsyncResponse.register() methods.
>>> * updated examples and javadoc accordingly
>>>
>>
>> At the moment, do you see @Suspended (as a parameter-level annotation)
>> redundant ? It does seem to me it is:
>>
>> @GET
>> public String get(@Suspended AsyncResponse) {}
>>
>
> Redundant, but, similarly we don't need @Context either.
>
OK
>> I mean, the runtime can decide what to do based on the fact that a given
>> method parameter type is AsyncResponse ?
>>
>> The other question, what about the following style:
>>
>> @GET
>> @Suspended
>> public String get() {}
>>
>
> This looks like @ManagedAsync and I thought we closed the book on that...
>
Right :-). I'm sorry, only now starting to look into it... Well, we can
of course do that in CXF only, would appreciate a short description why,
there was a long discussion which I spotted while looking for the last
message in the thread, difficult to get why it was dropped :-)
The style looks less-intrusive for me, thought it would do nice as an
alternative (but not as the substitution to AsyncResponse)

Sergey