>> I tried it, and ended up with the same result. This comes from
>> com.titan.cabin.CabinBean.ejbCreate():
>>
>> public CabinPK ejbCreate(int id){
>> this.id = id;
>> return null;
>> }
>>
>> The return type is the type of the bean's primary key (CabinPK, which
>> only contains an int), but the method returns null. Is this legal? (In
>> testbeans for example, the ejbCreate method for EntityPKBean returns the
>> bean's PK.)
>>
>> Sebastien
>>
>
> That seems pretty bogus to me. It should definitely not return null.
> Also, I thought the whole point of the ejbcreate method was to verify if
> the entity by that key actually exists in the database? All of > my beans
> 'select id where id=?' and verify there is a result set.
>
> Mattias
EJB 1.1 Spec 9.4.2 (pg 131) says that ejbCreate in Entity Beans with CMP should 'be
coded to return null':
--- EJB 1.1 Spec 9.4.2 ---
The ejbCreate(...) methods must be defined to return the primary key class type. The
implemen-tation of the ejbCreate(...) methods should be coded to return a null. The
returned value is ignored by the Container.
---
For Entity Beans with BMP, the ejbCreate method should return the primary key to the
record that was just created.
- jeremiah
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]