From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

CDI overview

CDI overview - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

CDI overview

- [Instructor] CDI or contexts and dependency injection was introduced in Java EE 6. The introduction of CDI provided Java developers with an alternative approach known as dependency injection for structuring their applications. There are two main concepts at the center of CDI, beans and dependency injection. Through Java's history there was always the concept of a bean. However, until Java EE 6 it wasn't clearly agreed upon. Java EE 6 introduced the managed bean standard which defines beans as non-static POJOs that contain business logic which are managed by a container. Managed beans can then be injected into other Java EE components, such as servlets, JAX-RS resources, and other beans. It's important to remember, that an object must be a bean to be used for dependency injection, which is the other core concept in CDI. Dependency injection changes how objects are created. Instead of creating objects using the new…

Contents