Title: ejbPostRemove()?

During a discussion with a colleague today we considered a situation where it would be nice to have a method, defined in the bean class itself, which performs cleanup after an EJB instance is removed. For example, if A has 1-many relationship with B, and A has a persisted status value based on the minimum of one attribute on its collection of Bs, then when an instance of B is deleted, A needs to recompute its status -- after the B instance is deleted.

Of course, this "business" logic could be defined in a session bean method, of course, but the nature of the relationship between A and B is fundamental to their existence, so shouldn't it be coded in the entity bean classes themselves?

The natural name for such a method would be ejbPostRemove, for symmetry with the spec-defined ejbPostCreate.

Charles May

*****************************************************************           DISCLAIMER:   The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee.  Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized.  If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.   

Reply via email to