FILE ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>OrderARSEJB</ejb-name>
<home>cmrex.OrderARSHome</home>
<remote>cmrex.OrderARS</remote>
<local-home>cmrex.OrderARSLocalHome</local-home>
<local>cmrex.OrderARSLocal</local>
<ejb-class>cmrex.OrderARSEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>OrderARS</abstract-schema-name>
<cmp-field>
<field-name>orderId</field-name>
</cmp-field>
<cmp-field>
<field-name>studentId</field-name>
</cmp-field>
<cmp-field>
<field-name>orderDate</field-name>
</cmp-field>
<cmp-field>
<field-name>status</field-name>
</cmp-field>
<cmp-field>
<field-name>amount</field-name>
</cmp-field>
<primkey-field>orderId</primkey-field>
</entity>
<entity>
<ejb-name>OrderARSLineItemEJB</ejb-name>
<local-home>cmrex.OrderARSLineItemLocalHome</local-home>
<local>cmrex.OrderARSLineItemLocal</local>
<ejb-class>cmrex.OrderARSLineItemEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>OrderARSLineitem</abstract-schema-name>
<cmp-field>
<field-name>orderLineItemId</field-name>
</cmp-field>
<cmp-field>
<field-name>courseId</field-name>
</cmp-field>
<cmp-field>
<field-name>fee</field-name>
</cmp-field>
<primkey-field>orderLineItemId</primkey-field>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>Order-LineItems</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Order-has-lineitems</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>OrderARSEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>lineItems</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>lineItem-belongsto-Order </ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>OrderARSLineItemEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>order</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
</relationships>
</ejb-jar>
*******************************************************************************
FILE weblogic-ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>OrderARSEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>cmrex/OrderARS</jndi-name>
<local-jndi-name>cmrex/OrderARSLocal</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OrderARSLineItemEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
</entity-descriptor>
<local-jndi-name>cmrex/OrderARSLineItemLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
************************************************************************************
FILE weblogic-rdbms-jar.xml
<!DOCTYPE weblogic-rdbms-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>OrderARSEJB</ejb-name>
<data-source-name>styejbDB</data-source-name>
<table-map>
<table-name>orders</table-name>
<field-map>
<cmp-field>orderId</cmp-field>
<dbms-column>order_id</dbms-column>
</field-map>
<field-map>
<cmp-field>studentId</cmp-field>
<dbms-column>student_id</dbms-column>
</field-map>
<field-map>
<cmp-field>orderDate</cmp-field>
<dbms-column>order_date</dbms-column>
</field-map>
<field-map>
<cmp-field>status</cmp-field>
<dbms-column>status</dbms-column>
</field-map>
<field-map>
<cmp-field>amount</cmp-field>
<dbms-column>amount</dbms-column>
</field-map>
</table-map>
</weblogic-rdbms-bean>
<weblogic-rdbms-bean>
<ejb-name>OrderARSLineItemEJB</ejb-name>
<data-source-name>styejbDB</data-source-name>
<table-map>
<table-name>orderlineitems</table-name>
<field-map>
<cmp-field>orderLineItemId</cmp-field>
<dbms-column>orderLineItem_id</dbms-column>
</field-map>
<field-map>
<cmp-field>courseId</cmp-field>
<dbms-column>course_id</dbms-column>
</field-map>
<field-map>
<cmp-field>fee</cmp-field>
<dbms-column>fee</dbms-column>
</field-map>
</table-map>
</weblogic-rdbms-bean>
<weblogic-rdbms-relation>
<relation-name>Order-LineItems</relation-name>
<weblogic-relationship-role>
<relationship-role-name>
lineItem-belongsto-Order
</relationship-role-name>
<relationship-role-map>
<column-map>
<foreign-key-column>order_id</foreign-key-column>
<key-column> order_id </key-column>
</column-map>
</relationship-role-map>
<db-cascade-delete/>
</weblogic-relationship-role>
</weblogic-rdbms-relation>
</weblogic-rdbms-jar>