Olá marques,
para trabalhar com chave composta com xdoclet basta vc tirar do começo da classe as tags de chave primaria de sua classe e nos campos onde são chave primarias colocar as tags de chave primaria do xdoclet.
tenho um exemplo aqui :
/**
* @ejb.bean name="Frequencia"
* jndi-name="FrequenciaBean"
* type="CMP"
* schema="Frequencia"
* cmp-version="2.x"
*
*
* @ejb.persistence
* table-name="TCB_FREQUENCIAS"
*
* @ejb.finder
* query="SELECT OBJECT(a) FROM Frequencia as a"
* signature="java.util.Collection findAll()"
*
* @ejb.value-object
* name="Frequencia"
* match="*"
**/
public abstract class FrequenciaBean implements EntityBean {
// ==========================================
// EJB callbacks
//==========================================
/**
* The ejbCreate method.
*
* @ejb.create-method
*/
public java.lang.Object ejbCreate(FrequenciaVO vo) throws javax.ejb.CreateException {
setCdInscricao(vo.getCdInscricao());
setDtFrequencia(vo.getDtFrequencia());
return null;
}
public void ejbPostCreate(FrequenciaVO vo) throws javax.ejb.CreateException {
setFrequenciaVO(vo);
}
// ==========================================
// CMP fields
//==========================================
/**
* Returns the cdInscricao
* @return the cdInscricao
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="CDINSCRICAO"
* sql-type="CHAR"
* @ejb.pk-field
* @ejb.interface-method
*/
public abstract java.lang.String getCdInscricao();
/**
* Sets the cdInscricao
*
* @param java.lang.String the new cdInscricao value
*
* @ejb.interface-method
*/
public abstract void setCdInscricao(java.lang.String cdInscricao);
/**
* Returns the dtFrequencia
* @return the dtFrequencia
*
* @ejb.persistent-field
* @ejb.pk-field
* @ejb.persistence
* column-name="DTFREQUENCIA"
* sql-type="DATE"
*
* @ejb.interface-method
*/
public abstract java.sql.Date getDtFrequencia();
/**
* Sets the dtFrequencia
*
* @param java.sql.Date the new dtFrequencia value
*
* @ejb.interface-method
*/
public abstract void setDtFrequencia(java.sql.Date dtFrequencia);