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

Clarify behaviour if both a stereotype and a bean class is used to select/deselect an alternative bean

    Details

    • Type: Clarification
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 1.1.PRD
    • Fix Version/s: 1.1.PFD
    • Component/s: None
    • Labels:
      None

      Description

      In CDI 1.1 a bean which has @Alternative stereotype applied may be selected using the bean class. If both a stereotype and a bean class is used to select/deselect an alternative bean, conflicts may occur (in the cotext of CDI-18). E.g.:

      
      @Stereotype
      @Alternative
      @Target({ TYPE, METHOD, FIELD })
      @Retention(RUNTIME)
      public @interface Mock {
      }
      
      @Mock
      class Foo {
      }
      
      <beans>
      <alternatives>
      <class priority="1000">org.mycompany.Foo</class&gt;
      <stereotype priority="100">org.mycompany.Mock</stereotype>
      </alternatives>
      </beans>
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mkouba Martin Kouba
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: