WAS v8.5 > Develop applications > Develop web applications > Develop web applications > Develop CDI

CDI

Contexts and Dependency Injection for the Java EE platform (CDI) is a JSR 299 implementation 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 web archive (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 WebSphere Application Server 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.

CDI is only supported with the default class loader policy, Class loader for each WAR file in application, and not with the alternative, single class loader for application setting.


Subtopics


Related


Troubleshooting contexts and dependency injection


Related information:

Develop applications that use CDI
CDI


+

Search Tips   |   Advanced Search