Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web applications > Develop web applications > Develop Contexts and Dependency Injection (CDI)


Contexts and Dependency Injection (CDI)

Contexts and Dependency Injection for the Java EE platform (CDI) is a JSR 299 implementation that is based on Apache OpenWebBeans.

CDI is activated in an application by the presence of a beans.xml file inside that module, as defined by the JSR 299 specification. We can find the beans.xml file in the WEB-INF directory of a WAR or META-INF directory of other types of archives. When activated, the container provides services such as:

The specification-related API classes for JSR 299 and JSR 330 and IBM modified implementation classes that are based on Apache OpenWebBeans are packaged with the application server runtime environment.

Although the WAS CDI implementation is based on Apache OpenWebBeans, there are some changes and additions on top of OpenWebBeans to support integration with the server run time:

Container-managed transactions and security are not provided by CDI.
Contexts and Dependency Injection (CDI)
Troubleshoot contexts and dependency injection

+

Search Tips   |   Advanced Search