You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (Updated) (JIRA)" <ji...@apache.org> on 2011/10/12 23:19:11 UTC

[jira] [Updated] (OWB-622) beanmanager injection in afterBeanDiscovery method parameter

     [ https://issues.apache.org/jira/browse/OWB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OWB-622:
------------------------------

    Fix Version/s: 1.1.2
    
> beanmanager injection in afterBeanDiscovery method parameter
> ------------------------------------------------------------
>
>                 Key: OWB-622
>                 URL: https://issues.apache.org/jira/browse/OWB-622
>             Project: OpenWebBeans
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Romain Manni-Bucau
>            Assignee: Mark Struberg
>             Fix For: 1.1.2
>
>
> The problem is reading the spec we don't know if BeanManager can be injected through method parameter in producer/observer so it should probably be done.
> here an extract of an IRC conversation with more details:
> <rmannibucau> hi, is it possible to inject the bean manager in a method (like beforebeandiscovery) ?
> <bergmark> Specifically a lifecycle method, or a method in a CDI manager bean?
> <bergmark> I ask because you can certainly inject method params into methods in a managed bean.  I don't think you can add a bean manager param to your afterBeanDiscovery event listener, but I might be wrong.
> <bergmark> Spec seems to prove me wrong though :)
> <bergmark> 11.5 says that service providers can obtain an injected BeanManager
> <bergmark> Presumably as a field though, not as a parameter into the observer method.
> <rmannibucau> ah
> <rmannibucau> i ask because seams does it
> <rmannibucau> so it doesnt work with oprnwebbeans just because of it
> <bergmark> seam injects the BeanManager as a parameter of the method with @Observes?
> <rmannibucau> yep
> <rmannibucau> in solder-impl-3.1.0.Beta3
> <bergmark> Might be a bug then, its not clear to me what 11.5 means when it says "and obtain an injected BeanManager reference".  That isn't very clear about how.
> <bergmark> I just assumed it meant via an injected field in the service provider, but perhaps they intended that statment to apply to observer method injection as well inside service providers.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira