Personally, I never do any work in MDB, but immediately send a bean session to the (nested) one.
In this bean the DB works. It either starts a new transaction, or I exit any exception from the bean and write it down (but do not let it run, so there is no re-delivery).
It also has the advantage that business logic is easy to reuse from other places.
Mike braun
source share