[
https://issues.apache.org/jira/browse/OWB-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246286#comment-13246286
]
Mark Struberg commented on OWB-658:
-----------------------------------
> beanManager.getBeans(BaseBean.class, new ServiceQualifier()) should return
> MyBeanA and MyBeanBAlt
nope, because MyBeanBAlt is also an @Alternative for MyBeanA. (because of the
extends BaseBean).
MyBeanBAlt + MyBeanA would only be returned if MyBeanBAlt would NOT extend
BaseBean.
And yes, filter criterias are a region where we certainly need to take care off
in the spec. I'm also not 100% sure if BeanManager#getBeans() or
BeanManager#resolve() should perform this part of the filtering. I'll discuss
this with the colleagues in the EG.
> BeanManager.getBeans(Type, Annotation...) can not be used to query all known
> beans
> ----------------------------------------------------------------------------------
>
> Key: OWB-658
> URL: https://issues.apache.org/jira/browse/OWB-658
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Injection and Lookup
> Affects Versions: 1.1.3
> Reporter: Andreas Erne
> Assignee: Mark Struberg
> Fix For: 1.1.4
>
>
> Expected behaviour: beanManager.getBeans(Object.class, new
> ServiceQualifier()) finds all beans that are qualified as "Service",
> regardless of the beans implementation type
> Effective behaviour: The BeanManager fails if a base type (Object in this
> example) is provided instead of a leaf type. In theses cases, the BeanManager
> finds the Alternative beans only and forgets about all beans that lack of an
> Alternative
> Reason: The BeanManager's helper
> org.apache.webbeans.container.InjectionResolver fails in method
> implResolveByType method as it can not handle collections of beans of
> different types. It treats all beans as if they where of the same type (and
> therefore have the same Alternative)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira