-
Clarification
-
Resolution: Obsolete
-
Major
-
None
-
1.2.Final
-
None
CDITCK-438 opens up an interesting question. Should CDI validate beans that are not enabled?
First, we need to make a distinction between a definition error (e.g. a field that is annotated with both @Inject and @Producer ) and a deployment problem (e.g. an unsatisfied dependency).
The spec currently explicitly requires deployment problems to be detected on enabled beans only:
The container must validate all injection points of all enabled beans, all observer methods, all disposer methods and all other Java EE component classes supporting injection when the application is initialized to ensure that there are no unsatisfied or unresolvable ambiguous dependencies.
However, It is not explicitly defined for definition errors, e.g:
If a Bean instance with qualifier @Intercepted is injected into a bean instance other than an interceptor instance, the container automatically detects the problem and treats it as a definition error.
does not say anything about enablement of the bean.
- is related to
-
CDITCK-438 InterceptorTypeParamFieldTest must either use @Priority or add the interceptors to beans.xml
-
- Resolved
-