[cdi-dev] easy solution for class visibility checks?

Pete Muir pmuir at redhat.com
Thu Dec 15 06:14:52 EST 2011

On 15 Dec 2011, at 11:10, Mark Struberg wrote:

> The BDA stuff is not only broken for @Alternatives, but also for <interceptors> and <decorators>

Right, I wrote e.g. not i.e. ;-) Sorry, was just being lazy.

> Plus: @Specializes is NOT affected by BDA as per CDI-1.0. But still gets hit by class visibility issues.

Right, this is not right in the CDI spec.

> Imo the container just cannot know whether a 3rd party Context is going to use the ThreadContextClassLoader, the SystemClassloader, the MyScoped.class.getClassLoader() etc. There is nothing a container can do about it, because _only_ the Context knows where it will store it's stuff.

Good point. There is definitely a shared responsibility though here, and I'm not sure we can shift all responsibility to the context.

More information about the cdi-dev mailing list