Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-905

@Alternative broken if multiple implementations are in the classpath

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.1.Final
    • Fix Version/s: None
    • Component/s: Resolution
    • Labels:
      None

      Description

      example (broken):

      bean-archive #1:

      • BeanA
      • BeanA1 (@Alternative)
      • beans.xml (activates BeanA1 as alternative)

      bean-archive #2:

      • BeanA2 (@Typed())
      • beans.xml (empty)

      BeanA1 doesn't get used (without an error or a warning BeanA is used instead - even though BeanA1 is activated as alternative in the same bean-archive)

      example (working):
      bean-archive #1:

      • BeanA
      • BeanA1 (@Alternative)
      • beans.xml (activates BeanA1 as alternative)

      jar #2 (no bean-archive):

      • BeanA2 (@Typed())

      BeanA1 gets activated as alternative (as expected) because jar #2 isn't a bean-archive (that's the difference compared to the broken example).

      that prevents >e.g.< portable extensions from providing extension-points to work around the broken @Alternative spec. section.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                luksa Marko Luksa
                Reporter:
                gpetracek Gerhard Petracek
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: