Hi David,
On page 338 of HF EJB, it states that by the time you are in the ejbPostCreate method - an EJBObject for the new entity has eiter been created or found. Should this not only be created? How can an EJBObject be found?
To my sense, you are completely right, and
HFE is in error while saying that you may find the EJBObject by the time you're in ejbpostCreate method .
If you're in this method, the EJBObject object is supposed to be created and is not supposed to be found --> so, as you say, you will get a DUplicateKeyException.
Some replies to your
thread tell you may found an existing EJBObject during ejbActivate method applied to a bean that has been passivated. But the authors of these threads forgot one thing
you are not allowed to call both ejbActivate and ejbCreate (and so ejbPostCreate. So, what happens to a passivated bean has nothing to do with ejbPostCreate method.
Well done David,
Regards,
Cyril.
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287