<?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>Facade</ejb-name>

         <home>org.jboss.test.cmp2.fkstackoverflow.ejb.FacadeHome</home>
         <remote>org.jboss.test.cmp2.fkstackoverflow.ejb.Facade</remote>
         <ejb-class>org.jboss.test.cmp2.fkstackoverflow.ejb.FacadeSession</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>SimpleParent</ejb-name>

         <local-home>org.jboss.test.cmp2.fkstackoverflow.ejb.SimpleParentLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkstackoverflow.ejb.SimpleParentLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkstackoverflow.ejb.SimpleParentCMP</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>SimpleParent</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>
         <primkey-field>id</primkey-field>

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

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

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

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

         <ejb-class>org.jboss.test.cmp2.fkstackoverflow.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[]]></description>
            <field-name>simpleParentId</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>complexParentId1</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>complexParentId2</field-name>
         </cmp-field>
         <primkey-field>id</primkey-field>

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

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

         <ejb-name>ComplexParent</ejb-name>

         <local-home>org.jboss.test.cmp2.fkstackoverflow.ejb.ComplexParentLocalHome</local-home>
         <local>org.jboss.test.cmp2.fkstackoverflow.ejb.ComplexParentLocal</local>

         <ejb-class>org.jboss.test.cmp2.fkstackoverflow.ejb.ComplexParentCMP</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>org.jboss.test.cmp2.fkstackoverflow.ejb.ComplexParentPK</prim-key-class>
         <reentrant>false</reentrant>
         <cmp-version>2.x</cmp-version>
         <abstract-schema-name>ComplexParent</abstract-schema-name>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>id1</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>id2</field-name>
         </cmp-field>
         <cmp-field >
            <description><![CDATA[]]></description>
            <field-name>firstName</field-name>
         </cmp-field>

	  <!-- Write a file named ejb-finders-ComplexParentBean.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>parent-children-simple2</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>child-has-parent</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Child</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>simpleParent2</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>parent-has-children</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>SimpleParent</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>children2</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>parent-children-complex2</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>child-has-parent</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Child</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>complexParent2</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>parent-has-children</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>ComplexParent</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>children2</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>parent-children-complex1</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>child-has-parent</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Child</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>complexParent1</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>parent-has-children</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>ComplexParent</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>children1</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>

      </ejb-relation>
      <ejb-relation >
         <ejb-relation-name>parent-children-simple1</ejb-relation-name>

         <ejb-relationship-role >
            <ejb-relationship-role-name>child-has-parent</ejb-relationship-role-name>
            <multiplicity>Many</multiplicity>
            <relationship-role-source >
               <ejb-name>Child</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>simpleParent1</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role >
            <ejb-relationship-role-name>parent-has-children</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source >
               <ejb-name>SimpleParent</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>children1</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </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 -->

   <!-- transactions -->
   <container-transaction >
      <method >
         <ejb-name>SimpleParent</ejb-name>
          <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
    </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Child</ejb-name>
          <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
    </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>Facade</ejb-name>
          <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
    </container-transaction>
   <container-transaction >
      <method >
         <ejb-name>ComplexParent</ejb-name>
          <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
    </container-transaction>

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

</ejb-jar>
