[cdi-dev] [JBoss JIRA] Commented: (CDI-109) Invalid beans should not be injectable into extensions
Pete Muir (JIRA)
jira-events at lists.jboss.org
Mon May 23 09:22:01 EDT 2011
[ https://issues.jboss.org/browse/CDI-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603678#comment-12603678 ]
Pete Muir commented on CDI-109:
-------------------------------
We can go two ways here. Either make it nonportable to look up beans in extensions, or mandate it's not possible.
Advantage of nonportable is that it allows containers to innovate here. Any thoughts?
> Invalid beans should not be injectable into extensions
> ------------------------------------------------------
>
> Key: CDI-109
> URL: https://issues.jboss.org/browse/CDI-109
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Affects Versions: 1.0
> Reporter: John Ament
> Priority: Minor
> Fix For: 1.1 (Proposed)
>
>
> Currently, you can inject beans that may not be ready yet into the extension's call back methods. As an example, I can inject something application scoped like this in to an extension, but it should really be throwing a definition exception (or similar):
> public void handleABD(@Observes AfterBeanDiscovery abd, MyApplicationScopedBean masb) {
> }
> Pete had noted that really the only safe thing to inject, other than the observed call back, is the bean manager.
--
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