public ScopeTrans(boolean rollbackOnChecked, boolean created, SpiTransaction transaction, TxScope txScope, SpiTransaction suspendedTransaction, SpiTransactionScopeManager scopeMgr) { this.rollbackOnChecked = rollbackOnChecked; this.created = created; this.transaction = transaction; this.suspendedTransaction = suspendedTransaction; this.scopeMgr = scopeMgr; this.noRollbackFor = txScope.getNoRollbackFor(); this.rollbackFor = txScope.getRollbackFor(); Thread t = Thread.currentThread(); originalUncaughtHandler = t.getUncaughtExceptionHandler(); t.setUncaughtExceptionHandler(this); }
public ScopeTrans(boolean rollbackOnChecked, boolean created, SpiTransaction transaction, TxScope txScope, SpiTransaction suspendedTransaction, SpiTransactionScopeManager scopeMgr) { this.rollbackOnChecked = rollbackOnChecked; this.created = created; this.transaction = transaction; this.suspendedTransaction = suspendedTransaction; this.scopeMgr = scopeMgr; this.noRollbackFor = txScope.getNoRollbackFor(); this.rollbackFor = txScope.getRollbackFor(); Thread t = Thread.currentThread(); originalUncaughtHandler = t.getUncaughtExceptionHandler(); t.setUncaughtExceptionHandler(this); }
public ScopeTrans(boolean rollbackOnChecked, boolean created, SpiTransaction transaction, TxScope txScope, SpiTransaction suspendedTransaction, SpiTransactionScopeManager scopeMgr) { this.rollbackOnChecked = rollbackOnChecked; this.created = created; this.transaction = transaction; this.suspendedTransaction = suspendedTransaction; this.scopeMgr = scopeMgr; this.noRollbackFor = txScope.getNoRollbackFor(); this.rollbackFor = txScope.getRollbackFor(); if (transaction != null) { if (!created && txScope.isBatchSet() || txScope.isBatchOnCascadeSet() || txScope.isBatchSizeSet()) { restoreBatch = transaction.getBatch(); restoreBatchOnCascade = transaction.getBatchOnCascade(); restoreBatchSize = transaction.getBatchSize(); restoreBatchGeneratedKeys = transaction.getBatchGetGeneratedKeys(); } if (txScope.isBatchSet()) { transaction.setBatch(txScope.getBatch()); } if (txScope.isBatchOnCascadeSet()) { transaction.setBatchOnCascade(txScope.getBatchOnCascade()); } if (txScope.isBatchSizeSet()) { transaction.setBatchSize(txScope.getBatchSize()); } if (txScope.isSkipGeneratedKeys()) { transaction.setBatchGetGeneratedKeys(false); } } }