<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" 
         xmlns="http://docbook.org/ns/docbook" 
         xmlns:xlink="http://www.w3.org/1999/xlink" 
         xmlns:xi="http://www.w3.org/2001/XInclude" 
         xmlns:svg="http://www.w3.org/2000/svg" 
         xmlns:mml="http://www.w3.org/1998/Math/MathML" 
         xmlns:html="http://www.w3.org/1999/xhtml" 
         xmlns:db="http://docbook.org/ns/docbook" 
         xml:lang="en" 
         xml:id="ejb2.deploy">

  <info><title>Defining the EJB2 Deployment Descriptor</title></info>
  
  <para>
     The target audience for this section is the Enterprise Bean provider, i.e. the person in charge of developing the software components on the server side. It describes how the bean provider should build the deployment descriptors of its components. 
     Refer to <xref linkend="xmltips"/> for advices about writing xml files.
  </para>
  <section xml:id="ejb2.deploy.Princip"><info><title>Principles</title></info>
    
    <para>
      The bean programmer is responsible for providing the deployment descriptor associated with the developed Enterprise Beans. The Bean Provider's responsibilities and the Application Assembler's responsibilities is to provide an XML deployment descriptor that conforms to the deployment descriptor's XML schema as defined in the EBJ specification version 2.1. (Refer to 
      <code>
        $JONAS_ROOT/xml/ejb-jar_2_1.xsd
      </code>
      or  
      <link xlink:href="http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
        http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd
      </link>
      ).
    </para>
    <para>
      To deploy Enterprise JavaBeans on the EJB server, information not defined in the standard XML deployment descriptor may be needed. For example, this information may include the mapping of the bean to the underlying database for an entity bean with container-managed persistence. This information is specified during the deployment step in another XML deployment descriptor that is specific to JOnAS. The JOnAS-specific deployment descriptor's XML schema is located in 
      <code>
        $JONAS_ROOT/xml/jonas-ejb-jar_X_Y.xsd
      </code>
      . The file name of the JOnAS-specific XML deployment descriptor must be the file name of the standard XML deployment descriptor prefixed by '
      <literal>
        jonas-
      </literal>
      '.
    </para>
    <para>
      The parser gets the specified schema via the classpath (schemas are packaged in the $JONAS_ROOT/lib/common/ow_jonas.jar file).
    </para>
    <para>
      The standard deployment descriptor should contain structural information for each enterprise bean that includes the following:
    </para>
    <itemizedlist>
      <listitem><para>
        the Enterprise bean's name,
      </para></listitem>
      <listitem><para>
        the Enterprise bean's class,
      </para></listitem>
      <listitem><para>
        the Enterprise bean's home interface,
      </para></listitem>
      <listitem><para>
        the Enterprise bean's remote interface,
      </para></listitem>
      <listitem><para>
        the Enterprise bean's type,
      </para></listitem>
      <listitem><para>
        a re-entrancy indication for the entity bean,
      </para></listitem>
      <listitem><para>
        the session bean's state management type,
      </para></listitem>
      <listitem><para>
        the session bean's transaction demarcation type,
      </para></listitem>
      <listitem><para>
        the entity bean's persistence management,
      </para></listitem>
      <listitem><para>
        the entity bean's primary key class,
      </para></listitem>
      <listitem><para>
        container-managed fields,
      </para></listitem>
      <listitem><para>
        environment entries,
      </para></listitem>
      <listitem><para>
        the bean's EJB references,
      </para></listitem>
      <listitem><para>
        resource manager connection factory references,
      </para></listitem>
      <listitem><para>
        transaction attributes.
      </para></listitem>
    </itemizedlist>
    <para>
      The JOnAS-specific deployment descriptor contains information for each enterprise bean including:
    </para>
    <itemizedlist>
      <listitem><para>
        the JNDI name of the Home object that implement the Home interface of     the enterprise bean,
      </para></listitem>
      <listitem><para>
        the JNDI name of the DataSource object corresponding to the resource     manager connection factory referenced in the enterprise bean's class,
      </para></listitem>
      <listitem><para>
        the JNDI name of each EJB references,
      </para></listitem>
      <listitem><para>
        the JNDI name of JMS administered objects,
      </para></listitem>
      <listitem><para>
        information for the mapping of the bean to the underlying database, if     it is an entity with container-managed persistence.
      </para></listitem>
    </itemizedlist>
    <anchor xml:id="ejb2.deploy.Exampl1">
    </anchor>
  </section>
  <section>
    <info><title>Example of Session Descriptors</title></info>
    
    <programlisting>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;

&lt;ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
		 http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
		 version="2.1"&gt;

  &lt;description&gt;secured session bean JOnAS example&lt;/description&gt;

  &lt;display-name&gt;secusb (earsample)&lt;/display-name&gt;

  &lt;enterprise-beans&gt;
    &lt;session&gt;
      &lt;ejb-name&gt;EarOp&lt;/ejb-name&gt;
      &lt;home&gt;org.ow2.jonas.earsample.beans.secusb.OpHome&lt;/home&gt;
      &lt;remote&gt;org.ow2.jonas.earsample.beans.secusb.Op&lt;/remote&gt;
      &lt;local-home&gt;org.ow2.jonas.earsample.beans.secusb.OpLocalHome&lt;/local-home&gt;
      &lt;local&gt;org.ow2.jonas.earsample.beans.secusb.OpLocal&lt;/local&gt;
      &lt;ejb-class&gt;org.ow2.jonas.earsample.beans.secusb.OpBean&lt;/ejb-class&gt;
      &lt;session-type&gt;Stateful&lt;/session-type&gt;
      &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
    &lt;/session&gt;
  &lt;/enterprise-beans&gt;

  &lt;assembly-descriptor&gt;
    &lt;security-role&gt;
      &lt;role-name&gt;tomcat&lt;/role-name&gt;
    &lt;/security-role&gt;
    &lt;security-role&gt;
      &lt;role-name&gt;jetty&lt;/role-name&gt;
    &lt;/security-role&gt;

    &lt;method-permission&gt;
      &lt;role-name&gt;tomcat&lt;/role-name&gt;
      &lt;method&gt;
	    &lt;ejb-name&gt;EarOp&lt;/ejb-name&gt;
	    &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
    &lt;/method-permission&gt;

    &lt;method-permission&gt;
      &lt;role-name&gt;jetty&lt;/role-name&gt;
      &lt;method&gt;
	    &lt;ejb-name&gt;EarOp&lt;/ejb-name&gt;
	    &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
    &lt;/method-permission&gt;

    &lt;container-transaction&gt;
      &lt;method&gt;
	&lt;ejb-name&gt;EarOp&lt;/ejb-name&gt;
	&lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;trans-attribute&gt;Supports&lt;/trans-attribute&gt;
    &lt;/container-transaction&gt;

  &lt;/assembly-descriptor&gt;

&lt;/ejb-jar&gt;</programlisting>
    <programlisting>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;


&lt;jonas-ejb-jar xmlns="http://www.objectweb.org/jonas/ns"
	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	      xsi:schemaLocation="http://www.objectweb.org/jonas/ns
		  http://www.objectweb.org/jonas/ns/jonas-ejb-jar_4_0.xsd" &gt;
  &lt;jonas-session&gt;
    &lt;ejb-name&gt;EarOp&lt;/ejb-name&gt;
    &lt;jndi-name&gt;EarOpHome&lt;/jndi-name&gt;
  &lt;/jonas-session&gt;
&lt;/jonas-ejb-jar&gt;</programlisting>
  </section>
  <section xml:id="ejb2.deploy.Exampl2">
    <info><title>Example of Container-managed Persistence Entity Descriptors (CMP 2.x)</title></info>
    <programlisting>&lt;?xml version="1.0"?&gt;

&lt;ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
		 http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
		 version="2.1"&gt;

  &lt;description&gt;Deployment descriptor for the cmp2 JOnAS example&lt;/description&gt;
  &lt;display-name&gt;cmp2 example&lt;/display-name&gt;
  &lt;enterprise-beans&gt;

	&lt;entity&gt;
      &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
      &lt;home&gt;com.titan.customer.CustomerHomeRemote&lt;/home&gt;
      &lt;remote&gt;com.titan.customer.CustomerRemote&lt;/remote&gt;
      &lt;local-home&gt;com.titan.customer.CustomerHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.customer.CustomerLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.customer.CustomerBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Integer&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Customer&lt;/abstract-schema-name&gt;
	  &lt;cmp-field&gt;&lt;field-name&gt;id&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;lastName&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;firstName&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;hasGoodCredit&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;primkey-field&gt;id&lt;/primkey-field&gt;
      &lt;ejb-local-ref&gt;
		&lt;ejb-ref-name&gt;ejb/AddressHomeLocal&lt;/ejb-ref-name&gt;  
		&lt;ejb-ref-type&gt;Entity&lt;/ejb-ref-type&gt;
		&lt;local-home&gt;com.titan.address.AddressHomeLocal&lt;/local-home&gt;
		&lt;local&gt;com.titan.address.AddressLocal&lt;/local&gt;
		&lt;ejb-link&gt;AddressEJB&lt;/ejb-link&gt;
      &lt;/ejb-local-ref&gt;
      &lt;ejb-local-ref&gt;
		&lt;ejb-ref-name&gt;ejb/CreditCardHome&lt;/ejb-ref-name&gt;
		&lt;ejb-ref-type&gt;Entity&lt;/ejb-ref-type&gt;
        &lt;local-home&gt;com.titan.customer.CreditCardHomeLocal&lt;/local-home&gt;
        &lt;local&gt;com.titan.customer.CreditCardLocal&lt;/local&gt;
        &lt;ejb-link&gt;CreditCardEJB&lt;/ejb-link&gt;
      &lt;/ejb-local-ref&gt;
      &lt;ejb-local-ref&gt;
        &lt;ejb-ref-name&gt;ejb/PhoneHomeLocal&lt;/ejb-ref-name&gt;
        &lt;ejb-ref-type&gt;Entity&lt;/ejb-ref-type&gt;
        &lt;local-home&gt;com.titan.phone.PhoneHomeLocal&lt;/local-home&gt;
        &lt;local&gt;com.titan.phone.PhoneLocal&lt;/local&gt;
        &lt;ejb-link&gt;PhoneEJB&lt;/ejb-link&gt;
      &lt;/ejb-local-ref&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllCustomers&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(c) FROM JE2_Customer AS c&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByName&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Customer c
        WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findSmith90&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Customer c
        WHERE c.lastName = 'Smith90'
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByExactName&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Customer c
        WHERE c.lastName = ?1 AND c.firstName = ?2
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByNameAndState&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Customer c
        WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 AND c.homeAddress.state = ?3
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByGoodCredit&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Customer c
        WHERE c.hasGoodCredit = TRUE
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByCity&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Customer c
        WHERE c.homeAddress.city = ?1 AND c.homeAddress.state = ?2
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findInHotStates&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
           SELECT OBJECT(c) FROM JE2_Customer c
           WHERE c.homeAddress.state IN ('FL','TX','AZ','CA')
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findWithNoReservations&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
            SELECT OBJECT(c) FROM JE2_Customer c
            WHERE c.reservations IS EMPTY
       &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findOnCruise&lt;/method-name&gt;
          &lt;method-params&gt;           
            &lt;method-param&gt;com.titan.cruise.CruiseLocal&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
         SELECT OBJECT(cust) FROM JE2_Customer cust, JE2_Cruise cr, IN (cr.reservations) AS res
         WHERE cr = ?1 AND cust MEMBER OF res.customers
       &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByState&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
         SELECT OBJECT(c) FROM JE2_Customer c
         WHERE c.homeAddress.state = ?1
         ORDER BY c.lastName,c.firstName
       &lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;AddressEJB&lt;/ejb-name&gt;
      &lt;local-home&gt;com.titan.address.AddressHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.address.AddressLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.address.AddressBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Object&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Address&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;street&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;city&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;state&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;zip&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllAddress&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(c) FROM JE2_Address c&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;ejbSelectZipCodes&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT a.zip FROM JE2_Address AS a  WHERE a.state = ?1&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;ejbSelectAll&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(a) FROM JE2_Address AS a&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;ejbSelectCustomer&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;com.titan.address.AddressLocal&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.homeAddress = ?1&lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;PhoneEJB&lt;/ejb-name&gt;                   
      &lt;local-home&gt;com.titan.phone.PhoneHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.phone.PhoneLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.phone.PhoneBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Object&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Phone&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;number&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;type&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllPhones&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(c) FROM JE2_Phone c&lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;CreditCardEJB&lt;/ejb-name&gt;                   
      &lt;local-home&gt;com.titan.customer.CreditCardHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.customer.CreditCardLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.customer.CreditCardBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Object&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_CreditCard&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;expirationDate&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;number&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;nameOnCard&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;creditOrganization&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllCreditCards&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(cc) FROM JE2_CreditCard cc&lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;CruiseEJB&lt;/ejb-name&gt;                   
      &lt;local-home&gt;com.titan.cruise.CruiseHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.cruise.CruiseLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.cruise.CruiseBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Object&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Cruise&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;name&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllCruises&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(cc) FROM JE2_Cruise cc&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByName&lt;/method-name&gt;
          &lt;method-params&gt;           
            &lt;method-param&gt;java.lang.String&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(c) FROM JE2_Cruise c WHERE c.name = ?1&lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;                   
      &lt;local-home&gt;com.titan.ship.ShipHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.ship.ShipLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.ship.ShipBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Integer&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Ship&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;id&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;name&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;tonnage&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;primkey-field&gt;id&lt;/primkey-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllShips&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(cc) FROM JE2_Ship cc&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByTonnage&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.Double&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
         SELECT OBJECT(s) FROM JE2_Ship s
         WHERE s.tonnage = ?1
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findByTonnage&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.Double&lt;/method-param&gt;
            &lt;method-param&gt;java.lang.Double&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(s) FROM JE2_Ship s
        WHERE s.tonnage BETWEEN ?1 AND ?2
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;ReservationEJB&lt;/ejb-name&gt;                   
      &lt;local-home&gt;com.titan.reservation.ReservationHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.reservation.ReservationLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.reservation.ReservationBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Object&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Reservation&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;amountPaid&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;date&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllReservations&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(cc) FROM JE2_Reservation cc&lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;entity&gt;
      &lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;
      &lt;home&gt;com.titan.cabin.CabinHomeRemote&lt;/home&gt;
      &lt;remote&gt;com.titan.cabin.CabinRemote&lt;/remote&gt;
      &lt;local-home&gt;com.titan.cabin.CabinHomeLocal&lt;/local-home&gt;
      &lt;local&gt;com.titan.cabin.CabinLocal&lt;/local&gt;
      &lt;ejb-class&gt;com.titan.cabin.CabinBean&lt;/ejb-class&gt;
      &lt;persistence-type&gt;Container&lt;/persistence-type&gt;
      &lt;prim-key-class&gt;java.lang.Integer&lt;/prim-key-class&gt;
      &lt;reentrant&gt;false&lt;/reentrant&gt;
      &lt;cmp-version&gt;2.x&lt;/cmp-version&gt;
      &lt;abstract-schema-name&gt;JE2_Cabin&lt;/abstract-schema-name&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;id&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;name&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;deckLevel&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;cmp-field&gt;&lt;field-name&gt;bedCount&lt;/field-name&gt;&lt;/cmp-field&gt;
      &lt;primkey-field&gt;id&lt;/primkey-field&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllOnDeckLevel&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;java.lang.Integer&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;
        SELECT OBJECT(c) FROM JE2_Cabin as c WHERE c.deckLevel = ?1
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;findAllCabins&lt;/method-name&gt;
          &lt;method-params&gt;&lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(cc) FROM JE2_Cabin cc&lt;/ejb-ql&gt;
      &lt;/query&gt;
      &lt;query&gt;
        &lt;query-method&gt;
          &lt;method-name&gt;ejbSelectAllForCustomer&lt;/method-name&gt;
          &lt;method-params&gt;
            &lt;method-param&gt;com.titan.customer.CustomerLocal&lt;/method-param&gt;
          &lt;/method-params&gt;
        &lt;/query-method&gt;
        &lt;ejb-ql&gt;SELECT OBJECT(cab) FROM JE2_Customer AS cust,
                IN (cust.reservations) AS res, IN (res.cabins) AS cab
                WHERE cust = ?1
        &lt;/ejb-ql&gt;
      &lt;/query&gt;
    &lt;/entity&gt;

    &lt;session&gt;
      &lt;ejb-name&gt;TravelAgentEJB&lt;/ejb-name&gt;
      &lt;home&gt;com.titan.travelagent.TravelAgentHomeRemote&lt;/home&gt;
      &lt;remote&gt;com.titan.travelagent.TravelAgentRemote&lt;/remote&gt;
      &lt;ejb-class&gt;com.titan.travelagent.TravelAgentBean&lt;/ejb-class&gt;
      &lt;session-type&gt;Stateless&lt;/session-type&gt;
      &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
      &lt;ejb-local-ref&gt;
        &lt;ejb-ref-name&gt;ejb/CabinHomeLocal&lt;/ejb-ref-name&gt; 
        &lt;ejb-ref-type&gt;Entity&lt;/ejb-ref-type&gt;
        &lt;local-home&gt;com.titan.cabin.CabinHomeLocal&lt;/local-home&gt;
        &lt;local&gt;com.titan.cabin.CabinLocal&lt;/local&gt;
        &lt;ejb-link&gt;CabinEJB&lt;/ejb-link&gt;
      &lt;/ejb-local-ref&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
    &lt;/session&gt;

    &lt;session&gt;
      &lt;ejb-name&gt;RTravelAgentEJB&lt;/ejb-name&gt;
      &lt;home&gt;com.titan.travelagent.RTravelAgentHomeRemote&lt;/home&gt;
      &lt;remote&gt;com.titan.travelagent.RTravelAgentRemote&lt;/remote&gt;
      &lt;ejb-class&gt;com.titan.travelagent.RTravelAgentBean&lt;/ejb-class&gt;
      &lt;session-type&gt;Stateless&lt;/session-type&gt;
      &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
      &lt;ejb-ref&gt;
        &lt;ejb-ref-name&gt;ejb/CabinHomeRemote&lt;/ejb-ref-name&gt; 
        &lt;ejb-ref-type&gt;Entity&lt;/ejb-ref-type&gt;
        &lt;home&gt;com.titan.cabin.CabinHomeRemote&lt;/home&gt;
        &lt;remote&gt;com.titan.cabin.CabinRemote&lt;/remote&gt;
      &lt;/ejb-ref&gt;
      &lt;security-identity&gt;&lt;use-caller-identity/&gt;&lt;/security-identity&gt;
    &lt;/session&gt;

  &lt;/enterprise-beans&gt;

  &lt;relationships&gt;
    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Customer-Address&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Customer-has-a-Address&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;
          &lt;cmr-field-name&gt;homeAddress&lt;/cmr-field-name&gt;
        &lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Address-belongs-to-Customer&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;
		&lt;cascade-delete/&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;AddressEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;

    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Customer-CreditCard&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Customer-has-a-CreditCard&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;   
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;&lt;cmr-field-name&gt;creditCard&lt;/cmr-field-name&gt;&lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;CreditCard-belongs-to-Customer&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;
		&lt;cascade-delete/&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CreditCardEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;&lt;cmr-field-name&gt;customer&lt;/cmr-field-name&gt;&lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;   

    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Customer-Phones&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Customer-has-many-Phone-numbers&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;   
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;
          &lt;cmr-field-name&gt;phoneNumbers&lt;/cmr-field-name&gt;
          &lt;cmr-field-type&gt;java.util.Collection&lt;/cmr-field-type&gt;
        &lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Phone-belongs-to-Customer&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;
		&lt;cascade-delete/&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;PhoneEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;   

    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Customer-Reservation&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Customer-has-many-Reservations&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;
          &lt;cmr-field-name&gt;reservations&lt;/cmr-field-name&gt;
          &lt;cmr-field-type&gt;java.util.Collection&lt;/cmr-field-type&gt;
        &lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Reservation-has-many-Customers&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;&lt;relationship-role-source&gt;
          &lt;ejb-name&gt;ReservationEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;
          &lt;cmr-field-name&gt;customers&lt;/cmr-field-name&gt;
          &lt;cmr-field-type&gt;java.util.Set&lt;/cmr-field-type&gt;
        &lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;

    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Cruise-Ship&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Cruise-has-a-Ship&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CruiseEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;&lt;cmr-field-name&gt;ship&lt;/cmr-field-name&gt;&lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Ship-has-many-Cruises&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;   

    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Cruise-Reservation&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Cruise-has-many-Reservations&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;   
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CruiseEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;
          &lt;cmr-field-name&gt;reservations&lt;/cmr-field-name&gt;
          &lt;cmr-field-type&gt;java.util.Collection&lt;/cmr-field-type&gt;
        &lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Reservation-has-a-Cruise&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;   
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;ReservationEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;&lt;cmr-field-name&gt;cruise&lt;/cmr-field-name&gt;&lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;

    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Cabin-Ship&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Cabin-has-a-Ship&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;           
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;&lt;cmr-field-name&gt;ship&lt;/cmr-field-name&gt;&lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Ship-has-many-Cabins&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;One&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;   
   
    &lt;ejb-relation&gt;
      &lt;ejb-relation-name&gt;Cabin-Reservation&lt;/ejb-relation-name&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Cabin-has-many-Reservations&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
      &lt;/ejb-relationship-role&gt;
      &lt;ejb-relationship-role&gt;
        &lt;ejb-relationship-role-name&gt;Reservation-has-many-Cabins&lt;/ejb-relationship-role-name&gt;
        &lt;multiplicity&gt;Many&lt;/multiplicity&gt;
        &lt;relationship-role-source&gt;
          &lt;ejb-name&gt;ReservationEJB&lt;/ejb-name&gt;
        &lt;/relationship-role-source&gt;
        &lt;cmr-field&gt;
          &lt;cmr-field-name&gt;cabins&lt;/cmr-field-name&gt;
          &lt;cmr-field-type&gt;java.util.Set&lt;/cmr-field-type&gt;
        &lt;/cmr-field&gt;
      &lt;/ejb-relationship-role&gt;
    &lt;/ejb-relation&gt;

  &lt;/relationships&gt;


  &lt;assembly-descriptor&gt;
    &lt;container-transaction&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;RTravelAgentEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;TravelAgentEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;AddressEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;   
      &lt;method&gt;
        &lt;ejb-name&gt;CreditCardEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;PhoneEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;CruiseEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;ReservationEJB&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;
    &lt;/container-transaction&gt;

    &lt;container-transaction&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;SequenceSession&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;method&gt;
        &lt;ejb-name&gt;Sequence&lt;/ejb-name&gt;
        &lt;method-name&gt;*&lt;/method-name&gt;
      &lt;/method&gt;
      &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;
    &lt;/container-transaction&gt;

  &lt;/assembly-descriptor&gt;

&lt;/ejb-jar&gt;
</programlisting>
    <programlisting>&lt;?xml version = "1.0" encoding = "UTF-8"?&gt;

&lt;jonas-ejb-jar xmlns="http://www.objectweb.org/jonas/ns"
	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	      xsi:schemaLocation="http://www.objectweb.org/jonas/ns
		  http://www.objectweb.org/jonas/ns/jonas-ejb-jar_4_0.xsd" &gt;

   &lt;jonas-entity&gt;
     &lt;ejb-name&gt;CustomerEJB&lt;/ejb-name&gt;
     &lt;jndi-name&gt;CustomerHomeRemote&lt;/jndi-name&gt;
     &lt;jdbc-mapping&gt;&lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;&lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

  &lt;jonas-entity&gt;
    &lt;ejb-name&gt;AddressEJB&lt;/ejb-name&gt;
    &lt;jdbc-mapping&gt;
        &lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;
    &lt;/jdbc-mapping&gt;
  &lt;/jonas-entity&gt;

    &lt;jonas-entity&gt;
      &lt;ejb-name&gt;CabinEJB&lt;/ejb-name&gt;
      &lt;jdbc-mapping&gt;&lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;&lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

   &lt;jonas-entity&gt;
    &lt;ejb-name&gt;PhoneEJB&lt;/ejb-name&gt;
    &lt;jdbc-mapping&gt;
       &lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;
    &lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

  &lt;jonas-entity&gt;
    &lt;ejb-name&gt;CreditCardEJB&lt;/ejb-name&gt;
    &lt;jdbc-mapping&gt;
       &lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;
    &lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

  &lt;jonas-entity&gt;
    &lt;ejb-name&gt;CruiseEJB&lt;/ejb-name&gt;
    &lt;jdbc-mapping&gt;
       &lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;
    &lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

  &lt;jonas-entity&gt;
    &lt;ejb-name&gt;ShipEJB&lt;/ejb-name&gt;
    &lt;jdbc-mapping&gt;&lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;&lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

  &lt;jonas-entity&gt;
    &lt;ejb-name&gt;ReservationEJB&lt;/ejb-name&gt;
    &lt;jdbc-mapping&gt;
       &lt;jndi-name&gt;jdbc_1&lt;/jndi-name&gt;
    &lt;/jdbc-mapping&gt;
   &lt;/jonas-entity&gt;

   &lt;jonas-session&gt;
     &lt;ejb-name&gt;RTravelAgentEJB&lt;/ejb-name&gt;
     &lt;jndi-name&gt;RTravelAgentHomeRemote&lt;/jndi-name&gt;
         &lt;jonas-ejb-ref&gt;
         &lt;ejb-ref-name&gt;ejb/CabinHomeRemote&lt;/ejb-ref-name&gt;  
         &lt;jndi-name&gt;CabinHomeRemote&lt;/jndi-name&gt;
       &lt;/jonas-ejb-ref&gt;
   &lt;/jonas-session&gt;
 
&lt;/jonas-ejb-jar&gt;
</programlisting>
  </section>
  
</section>