Defining references in Java EE modules (J2EE 1.4)

Java™ EE application clients, Web modules, and individual enterprise beans in EJB modules can include references to other resources. Reference types include EJB references, message destination references, resource references, resource environment references, security role references, and Web service references. You can use the deployment descriptor editors to invoke the Add Reference wizard from thedeployment descriptor editor.

About this task

The Java EE and EJB specifications provide for the means for components to define "logical" names that refer to other resources. For example, an EJB reference is a logical name that refers to the home of an enterprise bean. A Web service reference is a logical name that refers to a Web service.

You can use the various deployment descriptor editors to define references. A wizard helps you to define new references, and you can quickly remove or modify properties of existing references within the deployment descriptor editor.

Procedure

  1. In the Enterprise Explorer of the Java EE perspective, select the deployment descriptor for your project where you want to include a reference. You can define references for EJB projects, application client projects, and web projects.
  2. Right-click the deployment descriptor and select Open With > Deployment Descriptor Editor from the pop-up menu.
  3. Click the References tab to go to the References page of the deployment descriptor editor.
  4. Click Add to open the Add Reference wizard.
    Note: For EJB projects, references are defined on a per bean basis. You must select an existing bean before you can click Add to define a reference.

    For more information about how to use the Add Reference wizard, see the related tasks links in this topic.


Feedback