private void initRelationships(final EjbModule jar, final Map<String, EnterpriseBeanInfo> infos) throws OpenEJBException { for (final EjbRelation ejbRelation : jar.getEjbJar().getRelationships().getEjbRelation()) { final Iterator<EjbRelationshipRole> iterator = ejbRelation.getEjbRelationshipRole().iterator(); final EjbRelationshipRole left = iterator.next(); final EjbRelationshipRole right = iterator.next(); // left role info final CmrFieldInfo leftCmrFieldInfo = initRelationshipRole(left, right, infos); final CmrFieldInfo rightCmrFieldInfo = initRelationshipRole(right, left, infos); leftCmrFieldInfo.mappedBy = rightCmrFieldInfo; rightCmrFieldInfo.mappedBy = leftCmrFieldInfo; } }