[
https://issues.apache.org/jira/browse/EXTCDI-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg resolved EXTCDI-13.
---------------------------------
Resolution: Fixed
> provide factory access to the BeanManager
> -----------------------------------------
>
> Key: EXTCDI-13
> URL: https://issues.apache.org/jira/browse/EXTCDI-13
> Project: MyFaces CODI
> Issue Type: New Feature
> Reporter: Mark Struberg
> Attachments: BeanManagerProvider.java
>
>
> The JSR-299 spec only defines 2 ways to access the BeanManager
> 1.) @Inject BeanManager bm;
> 2.) via JNDI lookup
> But there is no factory method to access the BeanManager from e.g. a
> ServletListener or any backend service which is not CDI managed.
> To work around this shortcoming, I wrote a small CDI Extension which simply
> listens to a random SystemEvent and remember the BeanManager for making it
> available via a factory accessor. I did choose the AfterBeanDiscovery event
> because this is the first point in time the BeanManager contains consistent
> information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.