Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-658

BeanManager.getBeans(Type, Annotation...) can not be used to query all known beans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.3
    • 1.1.4
    • Injection and Lookup
    • None

    Description

      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)

      Attachments

        Activity

          People

            struberg Mark Struberg
            aern Andreas Erne
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: