<?xml version="1.0" encoding="UTF-8"?>
<!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 >

   <description><![CDATA[No Description.]]></description>
   <display-name>Generated by XDoclet</display-name>

   <enterprise-beans>

      <!-- Session Beans -->
      <session >
         <description><![CDATA[]]></description>

         <ejb-name>Manager</ejb-name>

         <home>org.jboss.test.cmp2.fkmapping.ejb.ManagerHome</home>
         <remote>org.jboss.test.cmp2.fkmapping.ejb.Manager</remote>
         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.ManagerSession</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>

      </session>

         <session>
         <description>JUnit Session Bean Test Runner</description>
         <ejb-name>EJBTestRunnerEJB</ejb-name>
         <home>org.jboss.test.util.ejb.EJBTestRunnerHome</home>
         <remote>org.jboss.test.util.ejb.EJBTestRunner</remote>
         <ejb-class>org.jboss.test.util.ejb.EJBTestRunnerBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
      </session>

      <!-- Entity Beans -->
      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Student</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.StudentLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.StudentLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.StudentCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkmapping.ejb.StudentPK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Student</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode2</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>lastName</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>description</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-StudentEntityBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Institute</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.InstituteLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.InstituteLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.InstituteCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkmapping.ejb.InstitutePK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Institute</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>instituteId</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>description</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-InstituteEntityBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>ChildUPK</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.ChildUPKLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.ChildUPKLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.ChildUPKCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>java.lang.Object</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>ChildUPK</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>firstName</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-ChildCMPUnknownPKBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Examenation</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.ExamenationLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.ExamenationLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.ExamenationCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkmapping.ejb.ExamenationPK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Examenation</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>examId</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>subject</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode2</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>groupNumber</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-ExamenationEntityBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Child</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.ChildLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.ChildLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.ChildCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>java.lang.Long</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Child</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>id</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>firstName</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Non-null CMP field mapped to the foreign key field Used as a read-only field to verify correctness of INSERT]]></description>
            <field-name>motherId</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[Non-null CMP field mapped to the foreign key field Used as a read-only field to verify correctness of INSERT]]></description>
            <field-name>motherName</field-name>
         </cmp-field>
         <primkey-field>id</primkey-field>

	  <!-- Write a file named ejb-finders-ChildCMPBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Parent</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.ParentLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.ParentLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.ParentCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkmapping.ejb.ParentPK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Parent</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>id</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>firstName</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-ParentCMPBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Department</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.DepartmentLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.DepartmentLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.DepartmentCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkmapping.ejb.DepartmentPK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Department</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode2</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>description</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-DepartmentEntityBean.xml if you want to define extra finders. -->
      </entity>

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Group</ejb-name>

         <local-home>org.jboss.test.cmp2.fkmapping.ejb.GroupLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkmapping.ejb.GroupLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkmapping.ejb.GroupCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkmapping.ejb.GroupPK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>Group</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>departmentCode2</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>groupNumber</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>description</field-name>
         </cmp-field>

         <query>
            <query-method>
               <method-name>findAll</method-name>
               <method-params>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(g) FROM Group g]]></ejb-ql>
         </query>
	  <!-- Write a file named ejb-finders-GroupEntityBean.xml if you want to define extra finders. -->
      </entity>

     <!--
       To add entity beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called entity-beans.xml that contains
       the <entity></entity> markup for those beans.
     -->

      <!-- Message Driven Beans -->
     <!--
       To add message driven beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called message-driven-beans.xml that contains
       the <message-driven></message-driven> markup for those beans.
     -->

   </enterprise-beans>

   <!-- Relationships -->
   <relationships >
      <ejb-relation >
         <ejb-relation-name>Institute-Department-StandaloneFK</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Department-has-Institute</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Department</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>institute</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Institute-has-Departments</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Institute</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>departments</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Group-Student-PartialFKToPK</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Student-has-Group</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Student</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>group</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Group-has-Students</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Group</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>students</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Department-Student-CompleteFKToPK</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Student-has-Department</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Student</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>department</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Department-has-Students</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Department</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>students</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Mother-Child</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Child-has-Mother</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Child</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>mother</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Mother-has-Child</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Parent</ejb-name>
            </relationship-role-source>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Group-Exam-FKToCMP</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Exam-has-Group</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Examenation</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>group</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Group-has-Exams</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Group</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>examenations</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Department-Group-CompleteFKToPK</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Group-has-Department</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Group</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>department</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Department-has-Groups</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Department</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>groups</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Mother-Child-upk</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Child-has-Mother</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>ChildUPK</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>mother</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Mother-has-Child</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Parent</ejb-name>
            </relationship-role-source>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>Father-Child-upk</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Child-has-Father</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>ChildUPK</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>father</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>Father-has-Child</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>Parent</ejb-name>
            </relationship-role-source>
         </ejb-relationship-role>

      </ejb-relation>
   </relationships>

   <!-- Assembly Descriptor -->
   <assembly-descriptor >
     <!--
       To add additional assembly descriptor info here, add a file to your
       XDoclet merge directory called assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
     -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- finder permissions -->

   <!-- transactions -->
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
          <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
    </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>createParent</method-name>
         <method-params>
            <method-param>java.lang.Long</method-param>
            <method-param>java.lang.String</method-param>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>createChild</method-name>
         <method-params>
            <method-param>java.lang.Long</method-param>
            <method-param>java.lang.String</method-param>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>createChild</method-name>
         <method-params>
            <method-param>java.lang.Long</method-param>
            <method-param>java.lang.String</method-param>
            <method-param>java.lang.Long</method-param>
            <method-param>java.lang.String</method-param>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>assertChildHasMother</method-name>
         <method-params>
            <method-param>java.lang.Long</method-param>
            <method-param>java.lang.Long</method-param>
            <method-param>java.lang.String</method-param>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>createChildUPKWithMother</method-name>
         <method-params>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>loadChildUPKWithMother</method-name>
         <method-params>
            <method-param>java.lang.Object</method-param>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>createChildUPKWithFather</method-name>
         <method-params>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Manager</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>loadChildUPKWithFather</method-name>
         <method-params>
            <method-param>java.lang.Object</method-param>
         </method-params>
      </method>
      <trans-attribute>RequiresNew</trans-attribute>
   </container-transaction>

   <!-- finder transactions -->
   </assembly-descriptor>

</ejb-jar>
