[cdi-dev] [JBoss JIRA] Commented: (CDI-33) fire ProcessAnnotatedType for AnnotatedTypes added via BBD.addAnnotatedType()

Aaron Anderson (JIRA) jira-events at lists.jboss.org
Fri Mar 18 11:35:54 EDT 2011


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

Aaron Anderson commented on CDI-33:
-----------------------------------

In my opinion, treating container discovered annotated types differently than extension added types completely breaks the intended type abstraction of the CDI extension framework. The CDI extensions I am developing uses the ProcessAnnotatedType event to convert custom annotations to CDI respected ones. I disable bean discovery and instead manually add types on the BeforeBeanDiscovery event for greater control. After upgrading to Weld 1.1 final from RC2 my extensions are completely broken and I have no way to fix them. A CDI developer cannot simply fire a ProcessAnnotatedType event of their own since the event contains a veto method which can only be honored by the container. Plus firing this event manually places unnecessary complexity on the developer as this should be handled by the container.       

> fire ProcessAnnotatedType for AnnotatedTypes added via BBD.addAnnotatedType()
> -----------------------------------------------------------------------------
>
>                 Key: CDI-33
>                 URL: https://issues.jboss.org/browse/CDI-33
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>    Affects Versions: 1.0
>            Reporter: Jozef Hartinger
>             Fix For: 1.1 (Proposed)
>
>
> Currently, the ProcessAnnotatedType event is fired for AnnotatedTypes discovered in a BDA only. However, portable extensions are allowed to register other AnnotatedTypes using addAnnotatedType() during the BeforeBeanDiscovery phase. For these AnnotatedTypes, the ProcessAnnotatedType event is not fired. 
> However, an extension A may register an AnnotatedType X via addAnnotatedType() and an extension B might want to react on the presence of AnnotatedType X. Therefore, it would be great to have the ProcessAnnotatedType fired also for AnnotatedTypes registered programatically in the BeforeBeanDiscovery phase.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list