Processes deployment descriptor env-entry configurations looking for cases where an injection target
is specified and the env-entry-type is one of the 'Simple Environment Entry' Java types listed in Section 5.4
of the Jakarta EE 9.1 Platform specification. If any are found, adds a CDI @{link Extension} that observes CDI
ProcessAnnotatedType events in order to ensure that the annotated type's resource injection configuration
reflects any env-entry that was found. Specifically, if the class name for the annotated type matches the
injection-target-class of a found env-entry, and the name of a field or name of a property with a setter
method matches the
injection-target-name of that env-entry, and the type of the field or setter parameter
is assignable from the specified
env-entry-type of that env-entry:
-
If the
env-entry-value for the env-entry is not specified, but the field or method is annotated
with an @Resource annotation with no lookup() or
mappedName(), configured, CDI is instructed to remove the @Resource annotation,
thus disabling injection, as discussed in section 5.4.1.3 of the Jakarta EE 9.1 Platform specification.
-
If the
env-entry-value for the env-entry is specified,, but the field or method is not annotated
with an @Resource annotation, CDI is instructed to add the @Resource annotation,
thus enabling injection, as discussed in section 5.4.1.3 of the Jakarta EE 9.1 Platform specification.