Hi Frankie,

No discussion AFAIK but the rational of annotated mode was to use a marker
on classes to discover it. It assumes the reflection model of the single
clasd is enough which also means the parent could be used if NOT in another
jar - otherwise it requires multiple passes and we dont want that. However
it is before CDI extensions so model/scope could be change so then you have
to ignore the parent to keep it sane. This means annotated mode must be
taken strictly as "directly annotated".

Side note being: dont use this mode, it has other pitfalls with
producers/observers so better to stay away from it for real life projects.
Trim ootiin was introduced in cdi2 and solves most of cdi1 issues.

Le ven. 22 févr. 2019 à 07:52, Frank Jung <kamin.feuer.2...@gmx.de> a
écrit :

> Hi,
>
>
>
> for a better understanding of the results of my previous post ("Issue with
> inherited Scoped-Annotation?") I digged into CDI 2.0 spec and found it
> somewhat ambiguous.
>
>
>
> "4.1. Inheritance of type-level metadata" tells us that child classes
> inherit scopes from their parents.
>
> "2.5. Default bean discovery mode" says that in bean discovery mode
> "annotated" only classes with a bean defining annotation are discovered.
>
>
>
> ObenWebBeans (SE) obviously  interpretes this in the way that classes with
> inherited scope are not considered having a "bean defining annotation".
>
> That's on one hand correct because they don't have it explicitely and on
> the
> other hand it's not correct because they do have it by inheritance.
>
>
>
> At first sight to me it would make more sense if classes with inherited
> scopes were discovered as beans, too.
>
>
>
> Are there any discussions concerning the interpretation of that topic in
> the
> spec that could help my understanding?
>
> (I already searched in the dev and user mailing list)
>
>
>
> Thank you
>
>
>
> Frankie
>
>
>
>

Reply via email to