<ejb-jar xmlns='http://caucho.com/ns/resin'>
  <enterprise-beans>
    <entity>
      <ejb-name>course</ejb-name>
      <local-home>example.CourseHome</local-home>
      <local>example.Course</local>
      <ejb-class>example.CourseBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      <reentrant>False</reentrant>
      <abstract-schema-name>courses</abstract-schema-name>
      <sql-table>xone2one_courses</sql-table>

      <cmp-field>
        <field-name>name</field-name>
        <sql-column>name</sql-column>
      </cmp-field>

      <primkey-field>name</primkey-field>

      <query>
        <query-method>java.util.Collection findAll()</query-method>
        <ejb-ql><![CDATA[SELECT o FROM courses o]]></ejb-ql>
      </query>
    </entity>
    <entity>
      <ejb-name>teacher</ejb-name>
      <local-home>example.TeacherHome</local-home>
      <local>example.Teacher</local>
      <ejb-class>example.TeacherBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      <reentrant>False</reentrant>
      <abstract-schema-name>courses</abstract-schema-name>
      <sql-table>xone2one_teachers</sql-table>

      <cmp-field>
        <field-name>name</field-name>
        <sql-column>name</sql-column>
      </cmp-field>

      <primkey-field>name</primkey-field>
    </entity>
  </enterprise-beans>

  <relationships>

    <ejb-relation>
      <ejb-relationship-role>
        <relationship-role-source>
          <ejb-name>course</ejb-name>
        </relationship-role-source>
        <cmr-field>
          <cmr-field-name>teacher</cmr-field-name>
        </cmr-field>
      </ejb-relationship-role>

      <ejb-relationship-role>
        <relationship-role-source>
          <ejb-name>teacher</ejb-name>
        </relationship-role-source>
        <cmr-field>
          <cmr-field-name>course</cmr-field-name>
        </cmr-field>
      </ejb-relationship-role>
    </ejb-relation>
  </relationships>
</ejb-jar>
