[cdi-dev] [JBoss JIRA] Issue Comment Edited: (CDI-33) fire ProcessAnnotatedType for AnnotatedTypes added via BBD.addAnnotatedType()
Pete Muir (JIRA)
jira-events at lists.jboss.org
Wed Jun 22 08:29:23 EDT 2011
[ https://issues.jboss.org/browse/CDI-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610291#comment-12610291 ]
Pete Muir edited comment on CDI-33 at 6/22/11 8:28 AM:
-------------------------------------------------------
h1. Proposal
Add this interface
{code}
interface ProcessSyntheticAnnotatedType extends ProcessAnnotatedType {
Extension getSource();
}
{code}
A {{ProcessSyntheticAnnotatedType}} event would be fired for every {{AnnotatedType}} added via {{BeforeBeanDiscovery.addAnnotatedType()}}. This event must be fired after {{BeforeBeanDiscovery}} and before the container starts creating beans (IOW at the same time other {{ProcessAnnotatedType}} events are fired). The {{getSource}} method would return the extension instance which called {{BBD.addAnnotatedType}}.
was (Author: petemuir):
h1. Proposal
Add this interface
{code}
interface ProcessSyntheticAnnotatedType extends AnnotatedType {
Extension getSource();
}
{code}
A {{ProcessSyntheticAnnotatedType}} event would be fired for every {{AnnotatedType}} added via {{BeforeBeanDiscovery.addAnnotatedType()}}. This event must be fired after {{BeforeBeanDiscovery}} and before the container starts creating beans (IOW at the same time other {{ProcessAnnotatedType}} events are fired). The {{getSource}} method would return the extension instance which called {{BBD.addAnnotatedType}}.
> 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
> Assignee: Pete Muir
> Priority: Minor
> Fix For: 1.1 (Confirmed)
>
>
> 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