|
Thanks. I think I get your point. The Java EE API doc on javax.transaction.TransactionScoped also says:
> Any Synchronization.afterCompletion methods will be invoked in an undefined context.
But if I read the CDI spec "10.5.1. Observer method invocation context" like this:
> Otherwise, if the observer method is any other kind of transactional observer method (such as TransactionPhase.AFTER_SUCCESS I guess), it is called [...] with the same [...] lifecycle contexts as the transaction that just completed.
Which is the behaviour that I was hoping for (and how it behaves in TomEE). Too bad it is not the case, since it could have been useful to have a bean backing a transaction and do something when the transaction completed.
|