CDI is one of several Java EE 6 features that help to integrate the web tier and the enterprise tier of the Java EE platform. CDI is a set of services that, used together, make it easy for developers to use enterprise beans along with JavaServer Faces technology in web applications. CDI also has many broader uses, allowing developers a great deal of flexibility to integrate various kinds of components in a loosely coupled but typesafe way.
A CDI stereotype allows you to create a annotation that club together several CDI annotations. For example, if we needed to create several CDI named beans with a scope of session, we would have to use two annotations in each of these beans, namely @Named and @SessionScoped. Instead of providing two annotations to each of the beans, you would create a stereotype, and then annotate the beans with it.
@Named
@SessionScoped
Stereotypes can be particularly useful in large applications where you have a number of beans that perform similar functions.
Duration: 30 minutes
Release Date: 18-JAN-2013
Created by: Paromita Dutta
This multi-part series introduces you to the Java EE 6 Contexts and Dependency Injection feature.
Release Date: 24-MAR-11
Release Date: 15-APR-11
Release Date: 01-MAR-10
Release Date: 15-FEB-10
Release Date: 20-JUN-12