}
} catch (final RollbackException e) {
txLogger.debug("The transaction has been rolled back rather than commited: {0}", e.getMessage());
final Throwable txe = new TransactionRolledbackException("Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization").initCause(e);
throw new ApplicationException(txe);
} catch (final HeuristicMixedException e) {
txLogger.debug("A heuristic decision was made, some relevant updates have been committed while others have been rolled back: {0}", e.getMessage());
throw new ApplicationException(new RemoteException("A heuristic decision was made, some relevant updates have been committed while others have been rolled back", e));
} catch (final HeuristicRollbackException e) {
txLogger.debug("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back: {0}", e.getMessage());
throw new ApplicationException(new RemoteException("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back", e));
} catch (final SecurityException e) {
txLogger.error("The current thread is not allowed to commit the transaction: {0}", e.getMessage());
throw new SystemException(e);