Without something like this, it makes tests basically unusable.
Such tests should use an "intermediate" bean (annotated with a bean defining annotation) to inject the config properties if they're intended to work with trimmed bean archives.
It seems unnatural to add a CDI annotation to something that's never managed as a CDI bean.
Yet users do it very often, e.g. when using @Inject on a servlet. However, for Java EE components there's a special treatment, e.g. ProcessInjectionPoint must be fired for every injection point of every Java EE component class supporting injection. |