Kathy , a doubt from ur book

Ramakrishna Allam

Ranch Hand

Posts: 34

posted 12 years ago

You said(if i remember correct) , in ur book , that the container does not call ejbLoad() before it ejbRemove() which makes sense as it doesnt have to synchronize the data before removing . But in one of the Q's from ejbcertificate.com , it says that "the persistent state of the instance at the beginning of the ejbRemove() method is the same as it would be at the beginning of a business method. The container must invoke ejbLoad before it invokes ejbRemove()." . Which is correct .

Zul Chewanabas

Greenhorn

Posts: 25

posted 12 years ago

This explanation is for entity bean. The way I understand from reading the book is (I don't think i read it somewhere else), "ejbRemove cannot happen in the pool because it needs to check for cascade-delete aw well. Hence, ejbActivate() is always called first followed bu ejbLoad(). This is what it means to have the method having the 'same state' as 'in the beginning of a business method.'SCJP 1.4 SCBCD 1.3