[JBoss JIRA] (CDI-402) Clarify ProcessAnnotatedType for implicit bean archives
by Jozef Hartinger (JIRA)
[ https://issues.jboss.org/browse/CDI-402?page=com.atlassian.jira.plugin.sy... ]
Jozef Hartinger edited comment on CDI-402 at 9/17/13 6:31 AM:
--------------------------------------------------------------
No, PAT is not necessarily fired for all classes in an implicit bean archive - only for those discovered which is defined as:
{quote}
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.
{quote}
was (Author: jharting):
No, PAT is not fired for all classes in an implicit bean archive - only those discovered which is defined as:
{quote}
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.
{quote}
> 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