Jakarta Contexts and Dependency Injection 2.0 (link:http://jakarta.ee/specifications/cdi) is an update to Contexts and Dependency Injection 1.2 (JSR-346).
Starting with version 2.0 CDI targets Java SE and Jakarta EE platforms. CDI in Java SE and CDI in a Jakarta EE container share the features defined in core CDI.
This document is organized in 4 parts:
This CDI 2.0 includes important changes for the platform.
-
The spec was split into 3 parts as described in Organisation of this document to add the support for Java SE.
-
API to boot CDI in Java SE, described in [se_bootstrap]
-
Observer ordering, described in [observer_ordering]
-
Asynchronous event, described in [firing_events_asynchronously]
-
Configurators for major SPI elements in [configurators]
-
Possibility to configure or veto observer method in [process_observer_method]
-
Add built-in annotation literals in [built_in_annotation_literals]
-
Make possible to apply interceptor on producer in [interception_factory]
-
Alignment on Java 8 features (streams, lambdas, repeating qualifiers)
The full changelog can be found here.