Match the name with a description of purpose or functionality, for each of the following deployment descriptor elements: ejb-name, abstract-schema-name, ejb-relation, ejb-relationship-role, cmr-field, cmr-field-type, and relationship-role-source.

The deployment descriptor provides the following information about the abstract persistence schemas of entity beans and their container-managed relationships:

					
<ejb-jar>
...
<enterprise-beans>
...
</enterprise-beans>

<relationships>
	<!--
	ONE-TO-MANY: Order LineItem
	-->
	<ejb-relation>
		<ejb-relation-name>Order-LineItem</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>OrderEJB</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>LineItemEJB</ejb-name>
			</relationship-role-source>
			<cmr-field>
				<cmr-field-name>order</cmr-field-name>
			</cmr-field>
		</ejb-relationship-role>
	</ejb-relation>
	
	<!--
	ONE-TO-MANY unidirectional relationship:
	Product is not aware of its relationship with LineItem
	-->
	<ejb-relation>
		<ejb-relation-name>Product-LineItem</ejb-relation-name>
		<ejb-relationship-role>
			<ejb-relationship-role-name>					
				product-has-lineitems
			</ejb-relationship-role-name>
			<multiplicity>One</multiplicity>
			<relationship-role-source>
				<ejb-name>ProductEJB</ejb-name>
			</relationship-role-source>
			<!-- since Product does not know about LineItem
			there is no cmr field in Product for accessing
			Lineitem
			-->
		</ejb-relationship-role>
		<ejb-relationship-role>
			<ejb-relationship-role-name>
				lineitem-for-product
			</ejb-relationship-role-name>
			<multiplicity>Many</multiplicity>
			<relationship-role-source>
				<ejb-name>LineItemEJB</ejb-name>
			</relationship-role-source>
			<cmr-field>
				<cmr-field-name>product</cmr-field-name>
			</cmr-field>
		</ejb-relationship-role>
	</ejb-relation>

	<!--
	ONE-TO-MANY: Order Customer:
	-->
	<ejb-relation>
		<ejb-relation-name>Order-Customer</ejb-relation-name>
		<ejb-relationship-role>
			<ejb-relationship-role-name>
				customer-has-orders
			</ejb-relationship-role-name>
			<multiplicity>One</multiplicity>
			<relationship-role-source>
				<ejb-name>CustomerEJB</ejb-name>
			</relationship-role-source>
			<cmr-field>
				<cmr-field-name>orders</cmr-field-name>
				<cmr-field-type>
					java.util.Collection
				</cmr-field-type>
			</cmr-field>
		</ejb-relationship-role>
		<ejb-relationship-role>
			<ejb-relationship-role-name>
				order-belongsto-customer
			</ejb-relationship-role-name>
			<multiplicity>Many</multiplicity>
			<relationship-role-source>
				<ejb-name>OrderEJB</ejb-name>
			</relationship-role-source>
			<cmr-field>
				<cmr-field-name>customer</cmr-field-name>
			</cmr-field>
		</ejb-relationship-role>
	</ejb-relation>
</relationships>
...
</ejb-jar>
					
					

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free Mock Exam Engine