OpenWebBeans
  1. OpenWebBeans
  2. OWB-658

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.1.4
    • Component/s: Injection and Lookup
    • Labels:
      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)

        Activity

        Andreas Erne created issue -
        Mark Struberg made changes -
        Field Original Value New Value
        Assignee Gurkan Erdogdu [ gerdogdu ] Mark Struberg [ struberg ]
        Mark Struberg made changes -
        Fix Version/s 1.1.4 [ 12319171 ]
        Mark Struberg made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Mark Struberg made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Andreas Erne made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Mark Struberg made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Struberg made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mark Struberg
            Reporter:
            Andreas Erne
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development