When I deploy the following CMP entity bean,
Jboss complains that it should not be declared as Abstract class. Can anyone show me what I did wrong? I thought the
ejb spec says that the CMP entity bean must be defined as abstract??? Thanks
Here is the class definition:
public abstract class EntityUserBean implements EntityBean {
private EntityContext context;
public
String getID(){
return this.getIdXX();
}
public abstract String getIdXX();
public abstract void setIdXX(String id);
public void setEntityContext(EntityContext ctx){
context = ctx;
}
public void unsetEntityContext(){ }
public void ejbLoad() {}
public void ejbStore() { }
public void ejbActivate(){}
public void ejbPassivate(){}
public void ejbRemove(){}
}
ejb-jar.xml:
<entity>
<ejb-name>User</ejb-name>
<local-home>com.ejb.EntityUserHome</local-home>
<local>com.ejb.EntityUser</local>
<ejb-class>com.ejb.EntityUserBean</ejb-class>
<abstract-schema-name>UserSchema</abstract-schema-name>
<persistence-type>Container</persistence-type>
<cmp-version>2.x</cmp-version>
<reentrant>False</reentrant>
<prim-key-class>java.lang.String</prim-key-class>
<cmp-field>
<field-name>idXX</field-name>
</cmp-field>
<primkey-field>idXX</primkey-field>
</entity>
standardjbosscmp-jdbc.xml:
<enterprise-beans>
<entity>
<ejb-name>User</ejb-name>
<table-name>Customerid</table-name>
<cmp-field>
<field-name>idXX</field-name>
<not-null/>
</cmp-field>
</entity>
</enterprise-beans>