New OBE Series: Contexts and Dependency Injection (CDI)
By tmcginn on Jan 24, 2013
OBE of the Month: CDI Series
This Oracle By Example (OBE) series covers three features of Contexts and Dependency Injection (CDI) introduced in Java EE 6: Stereotypes, Interceptors and Events. CDI was introduced with Java Platform, Enterprise Edition (Java EE) 6 as JSR-299.
The Contexts part of CDI allows beans to share and participate in the life cycle of another bean, while the Dependency Injection part of CDI allows beans to get a reference to an instance of another bean simply by injecting it. CDI power is the ability to loosely-couple classes by removing the instantiation process and simultaneously enforcing strong-type checking.
Check out all of the great free content on the Oracle Learning Library and our new cool look-and-feel!