users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Inheritance of Application name-bindings

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 19 Sep 2012 21:36:28 +0100

On 19/09/12 18:51, Santiago Pericas-Geertsen wrote:
>
> On Sep 19, 2012, at 10:12 AM, Sergey Beryozkin wrote:
>
>> On 19/09/12 14:21, Santiago Pericas-Geertsen wrote:
>>> Hi Sergey,
>>>
>>> On Sep 18, 2012, at 4:38 PM, Sergey Beryozkin wrote:
>>>
>>>> Application name-bindings do apply to providers this Application provides (filters, interceptors).
>>>>
>>>> What is the rule when some of the providers have their own name-bindings ? Do they end up with their own name-bindings + those belonging to Application ?
>>>
>>> Not sure I understand the use case you have in mind. Could you elaborate or show an example?
>>
>> Well, I'm not exactly proposing anything yet, first of all I'd like to understand the default rules.
>>
>> Do provider-specific name-bindings are ignored or preferred when Application class which enables these providers has its own name bindings ?
>
> I just don't understand the use case in which a name binding will be "ignored or preferred" as you say. Annotating an Application subclass with @Foo, defined using @NameBinding, is equivalent to annotating every resource class in your application with @Foo (i.e., it's just a shorthand). So in principle it shouldn't introduce any unclear scenario that we didn't consider before.
>
> Name binding is "additive". So in that sense, they are neither preferred nor ignored.
>
OK. Effectively it is every resource method that inherits these
annotations, that was not clear to me originally

Thanks, Sergey



> -- Santiago
>