* In a JTA env, the before transaction completion is called before the flush, so not all changes are yet
* written. However, Synchronization-s do propagate exceptions, so they can be safely used.
*/
final ActionQueue actionQueue = eventSource.getActionQueue();
actionQueue.registerProcess( new DelegateToSynchronizationOnBeforeTx( synchronization ) );
eventSource.getTransaction().registerSynchronization(
new BeforeCommitSynchronizationDelegator( synchronization )
);
//executed in all environments