O'Reilly logo

Java EE 6 Development with NetBeans 7 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Contexts and Dependency Injection (CDI)

Contexts and Dependency Injection (CDI) is a new addition to the Java EE specification. CDI can be used to simplify integrating the different layers of a Java EE application. For example, CDI allows us to use a session bean as a managed bean, allowing us to take advantage of EJB features such as transactions directly in our managed beans.

In this chapter we will cover the following topics:

  • Introduction to CDI
  • Qualifiers
  • Stereotypes
  • Interceptor Binding Types

Introduction to CDI

All we need to do to take advantage of Contexts and Dependency Injection features in our Web Application projects is to click on the checkbox labeled Enable Contexts and Dependency Injection on the second page of the New Web Application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required