1 Reply Latest reply on May 24, 2013 5:10 AM by mkouba

    @Vetoed vs. <scan> and <exclude>

    juergen.zimmermann

      Is the new @Vetoed annotation in CDI 1.1 the same as using <scan> and <exclude> in beans.xml?

        • 1. Re: @Veto vs. <scan> and <exclude>
          mkouba

          Hi Juergen,

           

          It depends. Basically it has the same effect (ProcessAnnotatedType is not fired and no corresponding bean exists). However  the class matching an exclude filter is de facto completely excluded from discovery unlike @Vetoed class which is discovered but not considered a bean (it does not meet the conditions mentioned in the spec: "3.1.1 Which Java classes are managed beans?" and "3.2 Session beans"). And of course scanning filters are descriptor-specific unlike @Vetoed (this might be important e.g. when writing Arquillian integration tests).