The Jakarta Contexts and Dependency Injection 4.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.
Enabling this feature
To enable the Jakarta Contexts and Dependency Injection 4.0 feature, add the following element declaration into your server.xml
file, inside the featureManager
element:
<feature>cdi-4.0</feature>
Feature configuration elements
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.build.compatible.spi
-
jakarta.enterprise.inject.literal
-
jakarta.enterprise.inject.se
-
jakarta.enterprise.inject.spi
-
jakarta.enterprise.inject.spi.configurator
-
jakarta.enterprise.lang.model
-
jakarta.enterprise.lang.model.declarations
-
jakarta.enterprise.lang.model.types
-
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-11.0
-
JavaSE-17.0
-
JavaSE-20.0
Features that enable this feature
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-4.0; type="osgi.subsystem.feature"
SPI packages provided by this feature
-
io.openliberty.cdi.spi