[cdi-dev] [JBoss JIRA] (CDI-50) Ability to veto beans, both unconditionally and based on classes visible

Gerhard Petracek (Commented) (JIRA) jira-events at lists.jboss.org
Wed Dec 28 10:25:10 EST 2011

    [ https://issues.jboss.org/browse/CDI-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653205#comment-12653205 ] 

Gerhard Petracek commented on CDI-50:

currently we have a discussion [1] about @Veto for deltaspike.
imo @Veto as it is in seam-solder doesn't fit >for the spec.< itself because extensions still get the corresponding ProcessAnnotatedType.

the current version of @Veto just works that way because there is no portable alternative for it.
however, if such an annotation gets included in the spec., classes which are annotated with it can be ignored for the >whole< bootstrapping process.
in this case the name 'Veto' doesn't make sense (for users) - marius summarized it with during our discussion:
  "@Veto is technically accurate, but not intuitive (and requires an understanding of class processing, which is not a user concern)"
(short addition: 'technically accurate' is correct if ProcessAnnotatedType#veto gets called - as mentioned before ProcessAnnotatedType#veto doesn't make sense imo, if it gets included in the spec. itself -> in this case the name wouldn't be accurate at all.)

while discussing this issue we found names which would fit better - e.g. @Unmanaged or @Exclude

[1] http://markmail.org/thread/htniv3wstkopblwt
> Ability to veto beans, both unconditionally and based on classes visible
> ------------------------------------------------------------------------
>                 Key: CDI-50
>                 URL: https://issues.jboss.org/browse/CDI-50
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Concepts, Packaging and Deployment
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>            Assignee: Pete Muir
>             Fix For: 1.1.EDR2
> This should support both a straight veto, and conditional based on classes available.
> Seam Solder supports this as @Veto and @Requires({Foo.class, Bar.class}).
> Mark Struberg proposed using @Optional

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list