[cdi-dev] [JBoss JIRA] Commented: (CDI-119) Standard way to obtain a BeanManager regardless of environment

Richard Hightower (JIRA) jira-events at lists.jboss.org
Sat Apr 30 14:18:18 EDT 2011


    [ https://issues.jboss.org/browse/CDI-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599238#comment-12599238 ] 

Richard Hightower commented on CDI-119:
---------------------------------------

This is likely an implementation detail, but the Singleton should be a Weakreference that points to the same BeanManager that is mapped in the ServletContext.

> Standard way to obtain a BeanManager regardless of environment
> --------------------------------------------------------------
>
>                 Key: CDI-119
>                 URL: https://issues.jboss.org/browse/CDI-119
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>    Affects Versions: 1.0
>            Reporter: Cloves Almeida
>            Priority: Minor
>             Fix For: 1.1 (Proposed)
>
>
> As an alternative to #CDI-117:
> There should be a standard way to obtain a BeanManager instance regardless of environment. I propose a BeanManagerFactory that would implement the following resolution:
> 1) if in a JEE environment, use the JNDI resolution already proposed on spec
> 2) if in a non-JEE servlet container, use the servlet context attribute as proposed in #CDI-117
> 3) else, fallback on a "singleton" BeanManager
> For extensability, one could override the resolution mechanism by providing his own BeanManagerResolver.

--
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