posted 18 years ago
Only in the ejbPostCreate do we know that the database object was REALLY created. An exception can happen at any time during ejbCreate, and the database instance might not be created. As a result, it's not until the ejbPostCreate that we REALLY KNOW a primary key has been initialized, and often, the ejbPostCreate method is used to work with the primary key.
Of course, the primary key is a manifestation of the fact that the entity now really exists. You can do anythign you want in the ejbPostCreate. From what I've seen, quite often logic that should be in the ejbPostCreate is placed in the create method, just because programmers don't know any better, and also because problems in the create method are somewhat rare.