From f1393c44e8e0f30da15a3443ebbf0c022c608fca Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 23 Oct 2007 18:31:29 +0000 Subject: More changes for deprecation of ExceptionTransformer in TransactionManager. --- src/main/java/com/amazon/carbonado/spi/TransactionManager.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/amazon/carbonado/spi/TransactionManager.java b/src/main/java/com/amazon/carbonado/spi/TransactionManager.java index 676a15d..f16f548 100644 --- a/src/main/java/com/amazon/carbonado/spi/TransactionManager.java +++ b/src/main/java/com/amazon/carbonado/spi/TransactionManager.java @@ -402,15 +402,12 @@ public abstract class TransactionManager { if (!txnMgr.commitTxn(mTxn)) { mTxn = null; } - } catch (PersistException e) { - mTxn = null; - throw e; } catch (Throwable e) { mTxn = null; if (txnMgr.mExTransformer != null) { throw txnMgr.mExTransformer.toPersistException(e); } - throw new PersistException(e); + throw ExceptionTransformer.getInstance().toPersistException(e); } } else { // Indicate fake nested transaction committed. @@ -439,13 +436,11 @@ public abstract class TransactionManager { if (mParent == null || mParent.mTxn != mTxn) { try { txnMgr.abortTxn(mTxn); - } catch (PersistException e) { - throw e; } catch (Throwable e) { if (txnMgr.mExTransformer != null) { throw txnMgr.mExTransformer.toPersistException(e); } - throw new PersistException(e); + throw ExceptionTransformer.getInstance().toPersistException(e); } } } finally { -- cgit v1.2.3