:numbered!:
["preface",sectnum="0"]

== Preface

include::license-{license}.asciidoc[]

=== Foreword

Jakarta Contexts and Dependency Injection 2.0 (link:http://jakarta.ee/specifications/cdi) is an update to Contexts and Dependency Injection 1.2 (link:https://jcp.org/en/jsr/detail?id=346[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.

[[doc_organisation]]

=== Organisation of this document

This document is organized in 4 parts:

* An introduction (this part), which is not part of the specification but introduces CDI concepts and give examples.
* The core CDI specification: <<part_1>>.
* Specific CDI features for Java SE: <<part_2>>.
* Specific CDI features for Jakarta EE: <<part_3>>.


=== Major changes

This CDI 2.0 includes important changes for the platform.

* The spec was split into 3 parts as described in <<doc_organisation>> 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 http://bit.ly/cdi2rl[here^].

:numbered:
<<<