// verify our tx is the current tx associated with the thread
// this is really only an error case and should never happen, but just to be sure double check
// immedately before committing using the transaction manager
Transaction currentTransaction = txnManager.getTransaction();
if (currentTransaction != transaction) {
throw new SystemException("An unknown transaction is currently associated with the thread: expectedTx=" + transaction + ", currentTx=" + currentTransaction);
}
txnManager.commit();
wasCommitted = true;
} catch (Throwable t) {