ejb-jar.xml

1    <ejb-jar> 
2     <enterprise-beans>  
3      <entity>  
4       <ejb-name>EnglishAuction</ejb-name>  
5       ...  
6      </entity>  
7      <entity>  
8       <ejb-name>AuctionBid</ejb-name>  
9       ...  
10     </entity>  
11     <entity>  
12      <ejb-name>Item</ejb-name>  
13      ...  
14     </entity>  
15     ...  
16    </enterprise-beans>  
17    ...  
18    <relationships>  
19     <ejb-relation>  
20      <ejb-relation-name>  
21       EnglishAuction-AuctionBid  
22      </ejb-relation-name>  
23    
24      <ejb-relationship-role>  
25       <ejb-relationship-role-name>  
26        auction-has-bids  
27       </ejb-relationship-role-name>  
28       <multiplicity>one</multiplicity>  
29       <relationship-role-source>  
30        <ejb-name>EnglishAuction</ejb-name>  
31       </relationship-role-source>  
32       <cmr-field>  
33        <cmr-field-name>bids</cmr-field-name>  
34        <cmr-field-type>java.util.Collection</cmr-field-type>  
35       </cmr-field>  
36      </ejb-relationship-role>  
37    
38      <ejb-relationship-role>  
39       <ejb-relationship-role-name>  
40        bid-belongs-to-auction  
41       </ejb-relationship-role-name>  
42       <multiplicity>many</multiplicity>  
43       <cascade-delete/>  
44       <relationship-role-source>  
45        <ejb-name>AuctionBid</ejb-name>  
46       </relationship-role-source>  
47       <cmr-field>  
48        <cmr-field-name>auction</cmr-field-name>  
49       </cmr-field>  
50      </ejb-relationship-role>  
51     </ejb-relation>  
52     ...  
53     <ejb-relation>  
54      <ejb-relation-name>  
55       EnglishAuction-Item  
56      </ejb-relation-name>  
57    
58      <ejb-relationship-role>  
59       <ejb-relationship-role-name>  
60        auction-offers-item  
61       </ejb-relationship-role-name>  
62       <multiplicity>one</multiplicity>  
63       <relationship-role-source>  
64        <ejb-name>EnglishAuction</ejb-name>  
65       </relationship-role-source>  
66       <cmr-field>  
67        <cmr-field-name>item</cmr-field-name>  
68       </cmr-field>  
69      </ejb-relationship-role>  
70    
71      <ejb-relationship-role>  
72       <ejb-relationship-role-name>  
73        item-is-offered-by-auction  
74       </ejb-relationship-role-name>  
75       <multiplicity>one</multiplicity>  
76       <relationship-role-source>  
77        <ejb-name>Item</ejb-name>  
78       </relationship-role-source>  
79      </ejb-relationship-role>  
80     </ejb-relation>  
81    ...  
82    </relationships>  
83    ...  
84    <assembly-descriptor>  
85     ...  
86    </assembly-descriptor>  
87   ...  
88   </ejb-jar>