Your First Cup: An Introduction to the Java EE Platform

ProcedureAdding an Enterprise Bean Reference

Use the javax.ejb.EJB annotation to inject a reference to the DukesBirthdayBean enterprise bean.

  1. Directly after the class declaration, add a private variable to hold a reference to the enterprise bean using the @EJB annotation:

    private DukesBirthdayBean dukesBirthday;
  2. Right-click in the editor and select Fix Imports.