Contexts and Dependency Injection (CDI)

Jakarta Contexts and Dependency Injection (CDI) is a standard specification for dependency injection and context management in Java enterprise applications. It provides a type-safe mechanism for injecting dependencies, managing object lifecycles through extensible contexts, and supporting…

Key facts

First appeared
2009
Category
technology
Problem solved
CDI solves the problem of managing dependencies and object lifecycles in Java EE applications without verbose XML configuration, unifying disparate component models like EJB and JSF managed beans into a single, type-safe programming model with support for loose coupling via injection, events, and interceptors.
Platforms
Java SE (CDI 2.0+), Jakarta EE

Related technologies

Notable users

  • Payara Services
  • Eclipse Foundation
  • Red Hat (WildFly/JBoss)
  • Quarkus.io