Your First Cup: An Introduction to the Java EE Platform

ProcedureAdding an Enterprise Bean Reference

Add a javax.ejb.EJB annotation to inject a reference to the DukesBirthdayBean enterprise bean. This session bean will be called from the methods in DukesBDay.

  1. Right-click in the editor window and select Call Enterprise Bean.

  2. In the Call Enterprise Bean dialog expand the firstcup application, select DukesBirthdayBean, and click OK. The following field will be added:


    @EJB
    private DukesBirthdayBean dukesBirthdayBean;