Define references in J2EE modules

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

The J2EE 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.

To open the Add Reference wizard from a deployment descriptor editor:

  1. In the Project Explorer of the J2EE perspective, expand the tree and select the Deployment Descriptor node for your project where you want to include a reference. You can define references for EJB projects, application client projects, and dynamic Web projects.

  2. Right-click the Deployment Descriptor node and select Open With > Deployment Descriptor Editor from the pop-up menu. The appropriate deployment descriptor for your module type opens. For example, an EJB module opens in the EJB deployment descriptor editor.

  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.

 

Related concepts

Client Deployment Descriptor editor

 

Related tasks

Adding EJB references
Adding message destination references
Adding resource manager connection factory references
Adding resource environment references
Adding security role references
Adding Web service references