[cdi-dev] [JBoss JIRA] (CDI-402) Clarify ProcessAnnotatedType for implicit bean archives

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Tue Sep 17 06:31:04 EDT 2013

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

Jozef Hartinger commented on CDI-402:

No, PAT is not fired for all classes in an implicit bean archive - only those discovered which is defined as:

First the container must discover types. The container discovers:
• each Java class, interface or enum deployed in an explicit bean archive, and
• each Java class with a bean defining annotation in an implicit bean archive.
• each session bean
that is not excluded from discovery.
Then, for every type discovered the container must create an AnnotatedType representing the type and fire an event of type
ProcessAnnotatedType, as defined in Section 11.5.6.
> Clarify ProcessAnnotatedType for implicit bean archives
> -------------------------------------------------------
>                 Key: CDI-402
>                 URL: https://issues.jboss.org/browse/CDI-402
>             Project: CDI Specification Issues
>          Issue Type: Bug
>            Reporter: Mark Struberg
> There is a sentence in the spec which might be heavy to implement correctly in a non-expensive way: "An implicit bean archive is any other archive which contains one or more bean classes with a bean defining annotation, or one or more session beans."
> This means that we _first_ need to scan all classes whether one of them has a scope, and then do it all over again and fire ProcessAnnotatedType events for all of them if we find one? 
> And to go one step further: is the assumption correct that we must not fire any PAT if no class with a scope has been found in that ClassPath entry?
> This might be pretty expensive to implement. 

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