# The Java EE 7 Tutorial

# 25 Contexts and Dependency Injection for Java EE: Advanced Topics

This chapter describes more advanced features of Contexts and Dependency Injection for Java EE (CDI). Specifically, it covers additional features CDI provides to enable loose coupling of components with strong typing, in addition to those described in Overview of CDI.

The following topics are addressed here:

- Packaging CDI Applications

- Using Alternatives in CDI Applications

- Using Producer Methods, Producer Fields, and Disposer Methods in CDI Applications

- Using Predefined Beans in CDI Applications

- Using Events in CDI Applications

- Using Interceptors in CDI Applications

- Using Decorators in CDI Applications

- Using Stereotypes in CDI Applications