In your ejb-jar.xml
you should have something like:
-----------------------------------------------------
<ejb-relation >
<ejb-relation-name>Team-Player</ejb-relation-name>
<ejb-relationship-role >
<ejb-relationship-role-name>Player-Belongs-To-Team</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source >
<ejb-name>YourPlayerEJB</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>team</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role >
<ejb-relationship-role-name>Team-Has-Players</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source >
<ejb-name>YourTeamEJB</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>players</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
And in your jbosscmp-jdbc.xml you should have:
-----------------------------------------------
<ejb-relation>
<ejb-relation-name>Team-Player</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Player-Belongs-To-Team</ejb-relationship-role-name>
<key-fields/>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>Team-Has-Players</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>id</field-name> <!--field name of primary key of Team table-->
<column-name>teamId</column-name> <!--field name of team id in Player table
</key-field>
</key-fields>
</ejb-relationship-role>
</ejb-relation>