jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Question about DynamicFeature

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 26 Sep 2012 10:51:22 +0100

On 25/09/12 17:12, Marek Potociar wrote:
> It just means that any name-bound filters bound via dynamic features will be bound to that method regardless of whether the method contains the proper name bindings or not.
OK, I understand. It would probably be clearer if the original text was
rephrased a bit, up to you really...

What I'd like to ask is this: what is the use case of getting the
feature introduced. I'm sure there's one, I'm just not quite seeing why
I'd recommend users to use DynamicFeature to register the filters as an
alternative to say using Application that can offer post-match global
(will apply to all methods) or name-bound (linked to specific methods)
filters, as well as interceptors.

Where does DynamicFeature add the extra dimension ?

Thanks, Sergey

>
> Marek
>
> On Sep 24, 2012, at 10:25 AM, Sergey Beryozkin<sberyozkin_at_talend.com> wrote:
>
>> Hi
>>
>> I'd like to ask for a clarification re DynamicFeature, the docs say:
>>
>> "Dynamic feature provider is used by JAX-RS runtime to register providers that shall be applied to a particular resource class and method and overrides any annotation-based binding definitions defined on the returned resource filter or interceptor instance."
>>
>> I'm confused by "...overrides any annotation-based binding definitions defined on the returned resource filter or interceptor instance."
>>
>> The feature dynamically adds providers (filters, interceptors). What exactly the 'overrides' refers to ?
>>
>> Thanks, Sergey
>


-- 
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com