[cdi-dev] [JBoss JIRA] Commented: (CDI-23) Allow BeanManager to be resolved as though you were in another bean archive

Mark Struberg (JIRA) jira-events at lists.jboss.org
Sat May 7 03:17:18 EDT 2011

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

Mark Struberg commented on CDI-23:

Nor sure if this is really a problem of the spec. Actually I think this is only caused by Weld being organized hierarchically (Not that OWB is better, but you might get _other_ problems). This makes it more flexible for different classloader configurations, but definitely restricts the use in such cases. 

Please note that it's _not_ defined from 'where' (in which jar) you get which BeanManager instance. 

In OWB we manage the different BeanManager instances on a ContextClassLoader base by default (can be changed via SPI) So all classes accessed in the same WebApp get the same ClassLoader. 

Also: Extensions _must_ _not_ assume a certain classloader or BeanManager hierarchy for being portable - because there is no such thing defined in the spec (neither in CDI nor in EE umbrella).

> Allow BeanManager to be resolved as though you were in another bean archive
> ---------------------------------------------------------------------------
>                 Key: CDI-23
>                 URL: https://issues.jboss.org/browse/CDI-23
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions, Resolution
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>             Fix For: 1.1 (Proposed)
> Currently it's not possible to access beans as though you were in another bean manager, something that is useful for extensions to be able to do. For example, if I want to create a facade over the ELResolver, or access a particular configuration bean.

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