OLL Mobile


Creating and Using a Contexts and Dependency Injection (CDI) Stereotype

General Information

  • 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.

    Stereotypes can be particularly useful in large applications where you have a number of beans that perform similar functions.

    Release Date: 18-Jan-13

    Duration: 30 minutes

    Credited To: Paromita Dutta

    No Flash Plugin Needed

Other Related Products

Visit the Full Site | About Oracle | Contact Us | Terms of Use