You wrote: "not tied to a bean instance but to a bean class". But the bean class is "disabled" according to the JavaDoc of @Specializes? My understanding of section "5.1.2 Enabled and disabled beans" is that a disabled bean [-class?] should not receive any CDI attention at all. The spec could perhaps be a bit more clear here as well.
What I do find to be clear is what I quoted previously: "we can be certain that the second bean [..] observer method [..] will never be called". With specialization, that is exactly what we intend and want. Unlike the @Alternative, we completely erase and replace the second bean.
I suspected that an observing public instance method declared in a superclass had a certain probability of being "inherited" and used by CDI even though it is said to be "disabled". But I didn't expect that to happen for private methods as well. The CDI spec quote telling us to be "certain" that not even observer methods of the superclass will be called, and then Weld calling private observer methods don't add. Anyways, thank you so much for your hard work and keen interest in this matter.
|