|
From: Stephane B. <ste...@be...> - 2004-07-05 16:36:34
|
While reviewing the code, I noticed the following errors: AccessRulesDataBean: The primary key fields are not cmp fields. But the pk hashcode is.=20 XDoclet cannot generate such a PK where 2 fields are not cmp-fields. I looked at the EJB 2.1 specifications and the current implementation=20 seems wrong: 10.8.2 Primary Key That Maps to Multiple Fields in the Entity Bean Class [...] The names of the fields in the primary key class must be a subset of the=20 names of the container-managed fields. (This allows the container to=20 extract the primary key fields from an instance=92s container-managed=20 fields, and vice versa.) As for other CMPs, they all violate specifications as they should return=20 null in their ejbCreate method 10.5.2 Bean Provider=92s Entity Bean Instance=92s View [...] The implementation of the Bean Provider=92s ejbCreate<METHOD> methods=20 should be coded to return a null.[18] [...] [18]The above requirement is to allow the creation of an entity bean=20 with bean-managed persistence by subclassing an entity bean with container-managed persistence. I will need to fix the AccessRules thing but will add the ejbCreate=20 fixes in the todo list. Cheers, Stephane |