!--a11y-->
Defining Relationships Between
Container-Managed Entity Beans 
The relationships are created.
1. Open the ejb-jar.xml
2. From the right-hand pane, choose the Relationships tab.
The relationships that you already created when developing the business logic of the entity bean appear in the left-hand pane of the Relationships tab. By selecting a relationship from the list, you can modify its deployment properties.
3. Enter the following data:
General
Property |
Description |
EJB Relation Name |
The name of the relationship. If specified, this name must be unique within the EJB JAR. |
Description |
A description of the relationship. |
Role 1 and 2
Property |
Description |
Role Name |
A name for the role in the relationship. This name must be unique within the relationship. |
Description |
A description of the role. |
Multiplicity |
The multiplicity of the role. You can only view the multiplicity, you cannot edit it here. |
Cascade Delete |
If checked, this option specifies that the lifetime of the bean participating in the relationship depends on the lifetime of the other entity bean in the relationship. That is, when the other bean in the relationship is removed, the bean checked for cascade delete will be automatically removed, too. You can specify cascade delete for an entity bean only if the multiplicity of the other entity bean in the relationship is set to One. |
Source Name |
Specifies the entity bean participating in the relationship. This field is disabled and you cannot edit it here. |
Source Description |
A description of the entity bean. |
CMR Field Name |
Specifies the name of a logical relationship field in the entity bean class. This field is disabled and you cannot edit it here. |
CMR Field Description |
A description of the cmr-field. |
CMR Field Type |
Specifies the class of a collection-valued logical relationship field in the entity bean. This field is disabled and you cannot edit it here. |
4. Optionally, in the Description field at the top of the Relationships tab, you can enter a short description for all relationships that you have defined.
See also:
