[cdi-dev] [JBoss JIRA] Commented: (CDI-3) Add add an event that fires after all ProcessAnnotatedType events that allows you to add new AnnotatedTypes

Mark Struberg (JIRA) jira-events at lists.jboss.org
Thu Apr 28 05:18:18 EDT 2011


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

Mark Struberg commented on CDI-3:
---------------------------------

Not sure if this works with the lifecycle. Adding an AnnotatedType _after_ scanning the beans would most probably create kind of a chicken-egg problem. So this would require us to repeat over the bean processing over and over again until nothing changes anymore. This sounds not really sane ;)

> Add add an event that fires after all ProcessAnnotatedType events that allows you to add new AnnotatedTypes 
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CDI-3
>                 URL: https://issues.jboss.org/browse/CDI-3
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>    Affects Versions: 1.0
>            Reporter: Stuart Douglas
>             Fix For: 1.1 (Proposed)
>
>
> At the moment AnnotatedTypes can only be added in the BeforeBeanDiscovery phase. This means that if you want to install additional beans based on the beans processed in the ProcessAnnotatedType phase you must instead add implementations of the Bean interface in the AfterBeanDiscovery phase. This interface is more limited than annotated type, and does not let you exactly mimic the behaviour of beans added as AnnotatedTypes.
> Some of the things that the bean interface will not let you mimic are:
> - Interceptors 
> - Disposal methods
> - Producer fields for normal scoped beans

--
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