// so ignore them unless they are the only transaction on the stack (in which case they
// should be flagged as INDEPENDENT transaction, but it doesn't hurt to check)
// TF:27/04/2008:Changed the check of the size to 0, as we've popped the top of the stack
if (transactionData.type != TransactionType.NESTED || currentTransactions.size() == 0) {
TransactionStatus currentStatus = transactionData.getStatus();
PlatformTransactionManager aTxn = transactionData.getManager();
if (aTxn != null && currentStatus != null) {
if (transactionData.rolledBack) {
// Something has previously rolled back, forcing this transaction to rollback
if (_log.isDebugEnabled()) {
_log.debug("Commit Transaction (will rollback): " + transactionData);
}
aTxn.rollback(currentStatus);
statistics.incrementRollbackCount();
}
else {
if (_log.isDebugEnabled()) {
_log.debug("Commit Transaction: " + transactionData);
}
aTxn.commit(currentStatus);
statistics.incrementCommitCount();
}
}
else {
statistics.incrementCommitCount();