[cdi-dev] [JBoss JIRA] (CDI-179) Relax requirements for obtaining a BeanManager reference from JNDI

Mark Struberg (Commented) (JIRA) jira-events at lists.jboss.org
Wed Oct 26 07:57:48 EDT 2011


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

Mark Struberg commented on CDI-179:
-----------------------------------

Actually it's not only JavaSE projects which have this problem. In my case I have a clean 3 tier architecture where my backend.jars have NO whatever servlet specific dependency! Just to prevent that some funny guy implements frontend parts in my backend.jar. So in a cleanly setup environment JNDI just entirely doesn't exist for 80% of of the code.

So I would not really care about JNDI names for non EE environments, because most people will not be able to retrieve it anyway. 

CODI and Seam3 both already provide nice Classes to access the BeanManager in a portable way. (for CODI see: https://svn.apache.org/repos/asf/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/provider/BeanManagerProvider.java)


                
> Relax requirements for obtaining a BeanManager reference from JNDI
> ------------------------------------------------------------------
>
>                 Key: CDI-179
>                 URL: https://issues.jboss.org/browse/CDI-179
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>    Affects Versions: 1.0
>            Reporter: Jozef Hartinger
>             Fix For: TBD
>
>
> The spec says:
> {quote}Java EE components may obtain an instance of BeanManager from JNDI by looking up the name java:comp/BeanManager.{quote}
> This is limiting since extensions often need to get a BeanManager reference from a *non-EE* component, e.g.:
> * https://github.com/seam/solder/blob/develop/impl/src/main/java/org/jboss/solder/beanManager/DefaultJndiBeanManagerProvider.java
> * https://resteasy.svn.sourceforge.net/svnroot/resteasy/trunk/jaxrs/resteasy-cdi/src/main/java/org/jboss/resteasy/cdi/CdiInjectorFactory.java

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

        


More information about the cdi-dev mailing list