[jboss-jira] [JBoss JIRA] (WFLY-2481) CDI.current().getBeanManager() returns a beanmanager from a different deployment

Max Pimm (JIRA) jira-events at lists.jboss.org
Tue Nov 12 16:48:07 EST 2013


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

Max Pimm commented on WFLY-2481:
--------------------------------

I've been looking at this but before attempting a solution i thought i'd best run it by you. 

My idea is to add a LoadingCache<String, BeanManagerProxy> to EnhancedWeld for each root BDA. This could be stored as a map with the root BDA as the key.

Can you see any problems with this? If not you can assign it to me.
                
> CDI.current().getBeanManager() returns a beanmanager from a different deployment
> --------------------------------------------------------------------------------
>
>                 Key: WFLY-2481
>                 URL: https://issues.jboss.org/browse/WFLY-2481
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld
>    Affects Versions: 8.0.0.Beta1
>         Environment: WildFly master build
>            Reporter: Emond Papegaaij
>            Assignee: Jozef Hartinger
>
> CDI.current().getBeanManager() uses the classname of the calling class to cache BeanManagers returned. This fails if multiple deployments contain classes with the same name. For example, wicket-cdi-1.1 looks up the BeanManager from org.apache.wicket.cdi.CdiConfiguration. If multiple Wicket-CDI applications are deployed in the same container, every BeanManager lookup will return the instance cached on the first call.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list