weblogic-ejb-jar.xml

1    <?xml version="1.0"?> 
2     
3    <!DOCTYPE weblogic-ejb-jar PUBLIC 
4      '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN' 
5      'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'> 
6     
7    <weblogic-ejb-jar> 
8      <weblogic-enterprise-bean> 
9        <ejb-name>EnglishAuction</ejb-name> 
10    
11       <entity-descriptor> 
12         <entity-cache> 
13           <max-beans-in-cache>100</max-beans-in-cache> 
14         </entity-cache> 
15         <persistence> 
16           <persistence-type> 
17             <type-identifier>WebLogic_CMP_RDBMS</type-identifier> 
18             <type-version>6.0</type-version> 
19             <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage> 
20           </persistence-type> 
21           <persistence-use> 
22             <type-identifier>WebLogic_CMP_RDBMS</type-identifier> 
23             <type-version>6.0</type-version> 
24           </persistence-use> 
25         </persistence> 
26       </entity-descriptor> 
27    
28       <reference-descriptor> 
29         <ejb-local-reference-description> 
30           <ejb-ref-name>ejb/AuctionBid</ejb-ref-name> 
31           <jndi-name>AuctionBid</jndi-name> 
32         </ejb-local-reference-description> 
33       </reference-descriptor> 
34    
35       <jndi-name>EnglishAuctionRemote</jndi-name> 
36       <local-jndi-name>EnglishAuction</local-jndi-name> 
37     </weblogic-enterprise-bean> 
38    
39     ... 
40    
41   </weblogic-ejb-jar>
weblogic-cmp-rdbms-jar.xml

1    <?xml version="1.0"?>  
2     
3    <!DOCTYPE weblogic-rdbms-jar PUBLIC  
4     '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN'  
5     'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>  
6    <weblogic-rdbms-jar>  
7      <weblogic-rdbms-bean>  
8        <ejb-name>EnglishAuction</ejb-name>  
9        <data-source-name>auctionSource</data-source-name>  
10       <table-name>auction</table-name>  
11    
12       <field-map>  
13         <cmp-field>idField</cmp-field>  
14         <dbms-column>id</dbms-column>  
15       </field-map>  
16       <field-map>  
17         <cmp-field>nameField</cmp-field>  
18         <dbms-column>Name</dbms-column>  
19       </field-map>  
20       ...  
21       <field-map>  
22         <cmp-field>quantityField</cmp-field>  
23         <dbms-column>Quantity</dbms-column>  
24       </field-map>  
25    
26       <automatic-key-generation>  
27         <generator-type>NAMED_SEQUENCE_TABLE</generator-type>  
28         <generator-name>auctionseq</generator-name>  
29         <key-cache-size>10</key-cache-size>  
30       </automatic-key-generation>  
31     </weblogic-rdbms-bean>  
32    
33     <weblogic-rdbms-bean>  
34       <ejb-name>AuctionBid</ejb-name>  
35       <data-source-name>auctionSource</data-source-name>  
36       <table-name>Bid</table-name>  
37    
38       <field-map>  
39         <cmp-field>idField</cmp-field>  
40         <dbms-column>id</dbms-column>  
41       </field-map>  
42       ...  
43       <field-map>  
44         <cmp-field>transactionIdField</cmp-field>  
45         <dbms-column>TransactionId</dbms-column>  
46       </field-map>  
47    
48       <automatic-key-generation>  
49         <generator-type>NAMED_SEQUENCE_TABLE</generator-type>  
50         <generator-name>bidseq</generator-name>  
51         <key-cache-size>10</key-cache-size>  
52       </automatic-key-generation>  
53     </weblogic-rdbms-bean>  
54    
55     <weblogic-rdbms-bean>  
56       <ejb-name>Bidder</ejb-name>  
57       ...  
58     </weblogic-rdbms-bean>  
59     <weblogic-rdbms-bean>  
60       <ejb-name>StreetAddress</ejb-name>  
61       ...  
62     </weblogic-rdbms-bean>  
63    
64     <weblogic-rdbms-bean>  
65       <ejb-name>Item</ejb-name>  
66       ...  
67     </weblogic-rdbms-bean>  
68    
69     <weblogic-rdbms-relation>  
70       <relation-name>EnglishAuction-LeadingBid</relation-name>  
71       <weblogic-relationship-role>  
72         <relationship-role-name>auction-has-a-leading-bid </relationship-role-name>  
73         <column-map>  
74           <foreign-key-column>LeadingBidId</foreign-key-column>  
75           <key-column>id</key-column>  
76         </column-map>  
77       </weblogic-relationship-role>  
78     </weblogic-rdbms-relation>  
79    
80     <weblogic-rdbms-relation>  
81       <relation-name>EnglishAuction-WinningBid</relation-name>  
82       ...  
83     </weblogic-rdbms-relation>  
84    
85     <weblogic-rdbms-relation>  
86       <relation-name>EnglishAuction-Item</relation-name>  
87       <weblogic-relationship-role>  
88         <relationship-role-name>auction-offers-item</relationship-role-name>  
89         <column-map>  
90           <foreign-key-column>ItemId</foreign-key-column>  
91           <key-column>id</key-column>  
92         </column-map>  
93       </weblogic-relationship-role>  
94     </weblogic-rdbms-relation>  
95    
96     <weblogic-rdbms-relation>  
97       <relation-name>EnglishAuction-AuctionBid</relation-name>  
98       <weblogic-relationship-role>  
99         <relationship-role-name>bid-belongs-to-auction</relationship-role-name>  
100        <column-map>  
101          <foreign-key-column>AuctionId</foreign-key-column>  
102          <key-column>id</key-column>  
103        </column-map>  
104      </weblogic-relationship-role>  
105    </weblogic-rdbms-relation>  
106   
107    <weblogic-rdbms-relation>  
108      <relation-name>Bidder-BillingAddress</relation-name>  
109      <weblogic-relationship-role>  
110        <relationship-role-name>  
111            bidder-has-a-billing-address  
112        </relationship-role-name>  
113        <column-map>  
114          <foreign-key-column>BillingAddressId</foreign-key-column>  
115          <key-column>id</key-column>  
116        </column-map>  
117      </weblogic-relationship-role>  
118    </weblogic-rdbms-relation>  
119   
120    <weblogic-rdbms-relation>  
121      <relation-name>Bidder-ShippingAddress</relation-name>  
122      ...  
123    </weblogic-rdbms-relation>  
124   
125    <weblogic-rdbms-relation>  
126      <relation-name>Bidder-AuctionBid</relation-name>  
127      <weblogic-relationship-role>  
128        <relationship-role-name>bid-submitted-by-bidder</relationship-role-name>  
129        <column-map>  
130          <foreign-key-column>BidderId</foreign-key-column>  
131          <key-column>id</key-column>  
132        </column-map>  
133      </weblogic-relationship-role>  
134    </weblogic-rdbms-relation>  
135   
136  </weblogic-rdbms-jar>