EJB JAR file - > Relationships tabbed pane
Use the Relationships tabbed pane to define the container-managed relationships between entity beans in the application. The existing container-managed relationships are represented by rows in the table. A line may be selected for editing or deletion, or a new relationship may be added to the list.
To add a new Container-Managed Relationship to this JAR,
To Edit an existing Relationship, select the Relationship in the table and click the Edit button. This opens the Edit Relationship dialog for editing an existing container-managed relationship. These dialogs are the same except that the Add Relationship dialog opens with no data filled in; while the Edit Relationship dialog opens with data from the selected relationship filled in ready for editing.
The EJB name fields are drop-down lists containing known entity EJBs in the JAR. Listed EJBs may be selected for defining or editing relationships. When an EJB has been selected, the bean will be introspected and its container managed reference (CMR) fields will be listed in the Field Referencing Bean X field.
The Multiplicity drop-down box allows the choice of the nature of the relationship from the following:
When adding the names of the beans and their relationships, references must be filled in.
The boxes for marking what happens to the bean when the other EJB is deleted define the "Cascade Delete" behavior of a bean in the relationship. The box is disabled if the other bean is not a bean in the relationship. When the box is checked the bean is deleted whenever the other bean is deleted.
Clicking OK brings back the Relationships pane with the new relationship showing as a row in the table.
An EJB must have local interfaces defined before it can be referenced by a CMR field of another bean. On OK an error dialog is presented when a CMR field references an EJB for which local interfaces have not been defined.
To remove a relationship, select a row from the table and click Delete.
To edit the container-managed persistence properties of the EJB JAR file, click the Sun-specific Settings button.