Iterator<Synchronization> it = synchronizationScheduler.reverseIterator();
while (it.hasNext()) {
Synchronization synchronization = it.next();
try {
if (log.isDebugEnabled()) { log.debug("executing synchronization " + synchronization); }
synchronization.beforeCompletion();
} catch (RuntimeException ex) {
if (log.isDebugEnabled()) { log.debug("Synchronization.beforeCompletion() call failed for " + synchronization + ", marking transaction as rollback only - " + ex); }
setStatus(Status.STATUS_MARKED_ROLLBACK);
throw ex;
}