BitronixTransaction bt = ((BitronixTransactionManager) ut).getCurrentTransaction();
// Ensure that all actions have occurred so that we get what is _really_ commited to the db
// (This code is straight from bitronix)
Iterator<?> iter = bt.getSynchronizationScheduler().reverseIterator();
while (iter.hasNext()) {
Synchronization synchronization = (Synchronization) iter.next();
try {
synchronization.beforeCompletion();
} catch (RuntimeException ex) {
bt.setStatus(Status.STATUS_MARKED_ROLLBACK);
throw ex;
}
}