[xwiki-devs] [VOTE] Use @Named (and @Qualifier annotations later on) for specifying component role

Thomas Mortagne thomas.mortagne at xwiki.com
Wed Mar 30 12:49:39 UTC 2011


On Wed, Mar 30, 2011 at 14:41, Vincent Massol <vincent at massol.net> wrote:
>
> On Mar 30, 2011, at 2:37 PM, Thomas Mortagne wrote:
>
>> On Wed, Mar 30, 2011 at 14:28, Vincent Massol <vincent at massol.net> wrote:
>>> Hi devs,
>>>
>>> I'd like to propose to deprecate the "value" and "hints" fields of @Component and instead use the @Named annotation (and @Qualifier annotations later on).
>>>
>>> The rationale is to align with JSR330's @Named annotation at injection points and also to start going in the direction of CDI (JSR299) since CDI uses @Named for beans too.
>>>
>>> Example before:
>>>
>>> @Component("hint")
>>> public class MyComponent...
>>>
>>> After:
>>>
>>> @Component
>>> @Named("hint")
>>> public class MyComponent
>>
>> Is @Component really required in that case ?
>
> Yes we still need to discover component declarations.

I mean if it's just for discovering we could change the test on
@Component to check @Component || @Named

>
>> Do we have to explicitly
>> use @Named("default") for default hint ?
>
> No.
>
> CDI says that @Default annotations are not required.
>
>>>
>>> Here's my +1
>>>
>>> Thanks
>>> -Vincent
>>>
>>
>> +1 for anything going in the direction of using JSR330
>>
>> --
>> Thomas Mortagne
>
> Thanks
> -Vincent
>
> _______________________________________________
> devs mailing list
> devs at xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne



More information about the devs mailing list