See a quote from 'Mastering EJB 3.0' below, it's about callbacks in Stateful EJBs:
You don’t need to worry about providing methods annotated as Pre
Passivate and PostActivate callbacks unless you are using open
resources, such as socket connections or database connections, that must be
reestablished after activation.
NOTE The following rules apply to the life-cycle callback methods:
■■ They must not throw application exceptions, but may throw runtime
exceptions. If thrown within a transaction, it will cause the transaction
to roll back.
From what I understand, if transaction is open Stateful EBJs are never passivated. Am I missing anything?
The State diagram of the statefull Session bean is the most complicate of all other Beans.
If the Business method is called in a transaction the Statefull goes in a "Method ready in TX" and the Passivate functionality is not available.
There are some other callback annotation that You could Use:
AfterBegin, BeforeCompletion, AfterCompletion.