Contexts and Dependency Injection (CDI) defines a set of complementary services that help improve the structure of application code.

CDI allows objects to be bound to lifecycle contexts, to be injected, to be associated with interceptors and decorators, and to interact in a loosely coupled fashion by {@linkplain javax.enterprise.event.Event firing} and {@linkplain javax.enterprise.event.Observes observing} events. {@linkplain javax.enterprise.inject Various kinds} of objects are injectable, including EJB 3 session beans, managed beans, {@linkplain javax.enterprise.inject.Produces producer methods} and Java EE resources. We refer to these objects in general terms as beans and to instances of beans that are bound to contexts as contextual instances.