Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-112

Clarify how alternatives are enabled

    XMLWordPrintable

Details

    • Clarification
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate Issue
    • 1.0
    • None
    • Beans
    • None

    Description

      The spec is open to interpretation about how alternatives are enabled. One popular interpretation is that alternatives must be enabled within the same bean archive that contains the alternative bean. However, it might be worth considering the merit of enabling an alternative from a deployment archive that contains the bean archive.

      For example, suppose we have the following deployment archive:

      foo.war
      /WEB-INF
      beans.xml
      /lib
      bar.jar
      /META-INF
      beans.xml
      /com
      /acme
      AlternativeBean.class

      It may be worth allowing AlternativeBean.class (a class annotated with @Alternative) to be enabled by listing it in the <alternatives> section of foo.war/WEB-INF/beans.xml.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sbryzak@redhat.com Shane Bryzak
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: