给你一个使用xdoclet的例子,customer:leaveword=1:nLeaveWordEJB.java...
//==========================================
// CMR fields
//==========================================
/**
* @ejb.interface-method
* @ejb.relation 
* name="leaveword-customer"
* role-name="leaveword-belongs_to-customer"
* target-ejb="Customer"
* target-role-name="customer-has-leavewords"
* target-multiple="yes"
*
* @jboss.relation
* fk-column="customerUId_fk"
* related-pk-field="customerUId"
*
* @weblogic.column-map
* foreign-key-column="customerUId_fk"
*/
public abstract CustomerLocal getCustomer();

/**
* @ejb.interface-method
*/
public abstract void setCustomer( CustomerLocal customer );    CustomerEJB.java由于是1;n所以在CustomerEJB中不用额外的xdoclet标记