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 (Resolved) (JIRA)" <ji...@apache.org> on 2011/10/13 20:47:12 UTC

[jira] [Resolved] (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 resolved OWB-622.
-------------------------------

    Resolution: Not A Problem

Tested the example and it crashes with a few other issues first. So I cannot test this because the used interceptors do not have the correct signature, thus OWB detects this problem and treats it as deployment exception
                
> 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