Jakarta Contexts and Dependency Injection
4.0
3.0
2.0
1.2

The Jakarta Contexts and Dependency Injection 3.0 specification makes it easier to integrate Jakarta EE components of different types. It provides a common mechanism to inject components such as enterprise beans or managed beans into other components such as JSPs or other enterprise beans.

If you are updating your application from using the cdi-3.0 feature to using the cdi-4.0 feature, changes in API behavior might require you to update your application code. For more information, see Differences between Jakarta Contexts and Dependency Injection 4.0 and 3.0.

Enabling this feature

To enable the Jakarta Contexts and Dependency Injection 3.0 feature, add the following element declaration into your server.xml file, inside the featureManager element:

<feature>cdi-3.0</feature>

Standard API packages provided by this feature

  • jakarta.decorator

  • jakarta.enterprise.context

  • jakarta.enterprise.context.control

  • jakarta.enterprise.context.spi

  • jakarta.enterprise.event

  • jakarta.enterprise.inject

  • jakarta.enterprise.inject.literal

  • jakarta.enterprise.inject.se

  • jakarta.enterprise.inject.spi

  • jakarta.enterprise.inject.spi.configurator

  • jakarta.enterprise.util

  • jakarta.inject

  • jakarta.interceptor

Third-party API packages provided by this feature

  • org.jboss.weld.context

  • org.jboss.weld.context.api

  • org.jboss.weld.context.bound

Supported Java versions

  • JavaSE-1.8

  • JavaSE-11.0

  • JavaSE-17.0

  • JavaSE-20.0

Developing a feature that depends on this feature

If you are developing a feature that depends on this feature, include the following item in the Subsystem-Content header in your feature manifest file.

io.openliberty.cdi-3.0; type="osgi.subsystem.feature"

SPI packages provided by this feature