[cdi-dev] [JBoss JIRA] (CDI-427) Review all annotations for inclusion to bean defining annotations

Antoine Sabot-Durand (JIRA) issues at jboss.org
Mon Mar 24 07:15:14 EDT 2014


    [ https://issues.jboss.org/browse/CDI-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12955466#comment-12955466 ] 

Antoine Sabot-Durand commented on CDI-427:
------------------------------------------

To be consistent with the decision that's been chosen in CDI-408, I think we should stick to what was decided in CDI-377, CDI-404 and 406 (Normal Scope type, Interceptor, Decorator and Stereotype). Anyway, here's my POV on class level annotation not in Bean defining annotation set.

* Qualifiers (built-in or user defined). As @Qualifier are defined in JSR 330, we shouldn't take them to avoid the same issue than in CDI-377
*  @Alternative : could bring a lot of issue regarding if the bean this alternative replace has been detected as a bean. And since activating an alternative requiers using beans.xml, it's not very far to switch the bean-discovery-mode to all
* @Specialize : same remark about the specialized bean being considered as a bean
* @Typed : the only class level annotation that would be easily added to the set. But is it necessary ?

                
> Review all annotations for inclusion to bean defining annotations
> -----------------------------------------------------------------
>
>                 Key: CDI-427
>                 URL: https://issues.jboss.org/browse/CDI-427
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>    Affects Versions: 1.1.FD
>            Reporter: Jozef Hartinger
>              Labels: CDI_spec_chge, CDI_tck_chge
>             Fix For: 1.2 Proposed
>
>
> The CDI spec change, which adds @Interceptor, @Decorator and stereotypes to the set of bean defining annotations, was merged. This made me think whether this approach where we add annotations based on demand is the right one. Instead, I think we should review all the annotations defined in the CDI API and evaluate if it makes to have them as bean defining annotations. I think that this would yield more consistent and less ad-hoc result.
> Two candidates that come to mind are @Alternative and @Specializes.
> This issue depends on the resolution of CDI-408

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list