From 2d19f5e828adc55b238e4dff64ca62868c1bcc83 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 21 Aug 2008 01:19:03 +0000 Subject: Removed broken nested transaction optimization. --- .../java/com/amazon/carbonado/txn/TransactionScope.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/amazon/carbonado/txn/TransactionScope.java b/src/main/java/com/amazon/carbonado/txn/TransactionScope.java index 62b62a3..daf4992 100644 --- a/src/main/java/com/amazon/carbonado/txn/TransactionScope.java +++ b/src/main/java/com/amazon/carbonado/txn/TransactionScope.java @@ -445,20 +445,7 @@ public class TransactionScope { if (mTxn != null) { scope.mTxnMgr.reuseTxn(mTxn); } else { - Txn parentTxn; - if (mParent == null || mTop) { - parentTxn = null; - } else if ((parentTxn = mParent.mTxn) == null) { - // No point in creating nested transaction if parent - // has never been used. Create parent transaction - // and use it in child transaction, just like a fake - // nested transaction. - if ((parentTxn = mParent.getTxn()) != null) { - return mTxn = parentTxn; - } - // Isolation level of parent is none, so proceed to create - // a real transaction. - } + Txn parentTxn = (mParent == null || mTop) ? null : mParent.getTxn(); if (mTimeoutUnit == null) { mTxn = scope.mTxnMgr.createTxn(parentTxn, mLevel); } else { -- cgit v1.2.3