And one more question, after reading https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#type_discovery_steps again. From what I read there, the @Vetoed beans should also trigger a ProcessAnnotatedType event and I could remove the @Vetoed annotation there. The only exception according to that text should be things excluded by an exclude filter. But the @Vetoed beans do not trigger that event. That's why in the last comment I wrote @Vetoed combined with BeforeBeanDiscovery#addAnnotatedType(...) while I would actually prefer @Vetoed combined with ProcessAnnotatedType#configureAnnotatedType(...). |