Contexts and Dependency Injection
The Contexts and Dependency Injection(CDI) for Java EE 1.1 Specification was developed under JSR 346. This section just gives you an overview of improvements in the API. The complete document specification (for more information) can be downloaded from http://jcp.org/aboutJava/communityprocess/final/jsr346/index.html.
What is CDI ?
Introduced in the Java EE platform from Version 6, Contexts and Dependency Injection for Java EE (CDI) is a specification that has brought to the platform a set of services that simplify the management of the lifecycle of objects, and standardize and encourage the use of dependency injection in the Java EE environment. In concrete terms, this specification gives us the ability to easily link in a loosely coupled and type-safe way the different layers (presentation, business and data access) of n-tier architectures. In order to do this, the CDI primarily relies on two services that are:
Context: This is used for the management of the...