| 1 |
<html> |
| 2 |
|
| 3 |
<body> |
| 4 |
|
| 5 |
<p>Contexts and Dependency Injection (CDI) defines a set of |
| 6 |
complementary services that help improve the structure of application |
| 7 |
code.</p> |
| 8 |
|
| 9 |
<p>Core CDI specification is split into Lite and Full. Lite includes |
| 10 |
most of the features and is tailored for runtimes that don't intend |
| 11 |
to implement the entire Jakarta EE platform. Full includes features |
| 12 |
that are not deemed necessary for all CDI implementations. Jakarta EE |
| 13 |
implementations are required to support Full.</p> |
| 14 |
|
| 15 |
<ul> |
| 16 |
<li>A well-defined lifecycle for stateful |
| 17 |
{@linkplain jakarta.enterprise.inject beans} bound to well-defined |
| 18 |
lifecycle {@linkplain jakarta.enterprise.context contexts}, where |
| 19 |
the set of contexts is {@linkplain jakarta.enterprise.context.spi |
| 20 |
extensible}</li> |
| 21 |
<li>A sophisticated, typesafe {@linkplain jakarta.enterprise.inject |
| 22 |
dependency injection mechanism}, including the ability to select |
| 23 |
dependencies at either {@linkplain jakarta.inject.Qualifier development} |
| 24 |
or {@linkplain jakarta.enterprise.inject.Alternative deployment} time, |
| 25 |
without verbose configuration</li> |
| 26 |
<li>Support for Jakarta EE modularity and the Jakarta EE component |
| 27 |
architecture—the modular structure of a Jakarta EE application is |
| 28 |
taken into account when resolving dependencies between Jakarta EE |
| 29 |
components</li> |
| 30 |
<li>{@linkplain jakarta.enterprise.inject Integration} with the |
| 31 |
Unified Expression Language, allowing any bean to be used directly |
| 32 |
within a JSF or JSP page (only in Full)</li> |
| 33 |
<li>The ability to {@linkplain jakarta.decorator decorate} injected |
| 34 |
beans (only in Full)</li> |
| 35 |
<li>The ability to associate |
| 36 |
{@code jakarta.interceptor.Interceptor} with beans via typesafe |
| 37 |
{@linkplain jakarta.enterprise.inject interceptor bindings}</li> |
| 38 |
<li>An {@linkplain jakarta.enterprise.event event} notification model</li> |
| 39 |
<li>A web {@linkplain jakarta.enterprise.context.ConversationScoped |
| 40 |
conversation context} in addition to the three standard |
| 41 |
web contexts defined by the Java Servlets specification (only in Full)</li> |
| 42 |
<li>A {@linkplain jakarta.enterprise.inject.build.compatible.spi build-compatible SPI} |
| 43 |
and a {@linkplain jakarta.enterprise.inject.spi runtime SPI} allowing portable |
| 44 |
extensions to integrate cleanly with the container (runtime SPI only in Full)</li> |
| 45 |
</ul> |
| 46 |
|
| 47 |
<p>CDI allows objects to be bound to lifecycle contexts, to be |
| 48 |
injected, to be associated with interceptors and decorators, and to |
| 49 |
interact in a loosely coupled fashion by |
| 50 |
{@linkplain jakarta.enterprise.event.Event firing} and |
| 51 |
{@linkplain jakarta.enterprise.event.Observes observing} events. |
| 52 |
{@linkplain jakarta.enterprise.inject Various kinds} of objects are |
| 53 |
injectable, including EJB 3 session beans, managed beans, |
| 54 |
{@linkplain jakarta.enterprise.inject.Produces producer methods} and |
| 55 |
Jakarta EE resources. We refer to these objects in general terms as beans |
| 56 |
and to instances of beans that are bound to contexts as contextual |
| 57 |
instances.</p> |
| 58 |
|
| 59 |
</body> |
| 60 |
|
| 61 |
</html> |