Having no beans.xml (aka implicit bean archive) or a bean-discovery-mode="annotated" will make the 'Type discovery' have only pick up concrete classes which are annotated with a 'bean defining annotation'. And thus we can only fire a ProcessAnnoatedType event for those classes. We don't know about the others at this stage.
We don't get any PAT for interfaces, enums, abstract classes, classes without explicit CDI scope, etc That's the reason you e.g. cannot use a DeltaSpike @MessageBundle or DeltaSpike-Data in such bean archives. That is that way as of CDI-1.1 and it's also TCK tested. Note that per spec if you have an Extension in a jar then you MUST add a beans.xml if you have CDI beans in that jar. In other words: a jar with an Extension is NOT an implicit bean archive. I'm pretty sure all this is well defined. But feel free to post on the spec list if you think there are some vaguely defined corner cases. LieGrue, strub > Am 23.07.2017 um 16:09 schrieb Eric Covener <[email protected]>: > > On Sun, Jul 23, 2017 at 8:13 AM, John D. Ament <[email protected]> wrote: >> We should probably review on cdi-dev. I believe the intention behind >> saying "classes discovered" [1] is to indicate that its for all classes, >> not just eligible beans. Here's a use case: I have framework specific >> classes, where the developer isn't required to add a scope. Framework adds >> the scope for them. To do that, they use bean-discovery-mode=annotated and >> PAT will add the dependent or other scope as appropriate. >> >> [1]: >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type >> >> On Sat, Jul 22, 2017 at 5:40 PM Mark Struberg <[email protected]> >> wrote: >> >>> In that case Romain is right. >>> >>> In an implicit BDA you only get PAT if the class has a bean defining >>> annotation. >>> Thats the reason we introduced all+trim. > > > John alluded to changing, not adding, a beans.xml in the OP, so IIUC > if it did not contain bean-discovery-mode=all + trim then it seems to > me that the type should have been processed.
