Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.8, 1.6.2
-
None
Description
Consider you have an observer method like
public void clearCacheAfterTx(@Observes(during=TransactionPhase.AFTER_COMPLETION) ClearAfterTx payload) {...}
and you fire the event
clearCacheEvent.fire(new ClearCacheEvent());
In this case firing the event currently blows up if the underlying transaction is already closed or rolled back. This happens because the transaction spec states that you cannot register a tx Synchronisation in certain states:
https://docs.oracle.com/javaee/6/api/javax/transaction/Transaction.html#registerSynchronization%28javax.transaction.Synchronization%29