@Override protected Object doGetTransaction() { DataSourceTransactionObject txObject = new DataSourceTransactionObject(); txObject.setSavepointAllowed(isNestedTransactionAllowed()); ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(obtainDataSource()); txObject.setConnectionHolder(conHolder, false); return txObject; }
public void startTransaction() { TransactionDefinition defn; if (transactions.isEmpty()) { log.debug("startTransaction: default"); defn = defaultTxnDef; } else if (writeTxnManager.isNestedTransactionAllowed()) { log.debug("startTransaction: nested"); defn = nested; } else { throw new RuntimeException("nested transactions not supported by current configuration"); } Txn txn = new Txn(writeTxnManager.getTransaction(defn), true); transactions.push(txn); log.debug("startTransaction: " + transactions.size()); }
@Override protected Object doGetTransaction() { DataSourceTransactionObject txObject = new DataSourceTransactionObject(); txObject.setSavepointAllowed(isNestedTransactionAllowed()); ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(obtainDataSource()); txObject.setConnectionHolder(conHolder, false); return txObject; }
@Override protected Object doGetTransaction() { DataSourceTransactionObject txObject = new DataSourceTransactionObject(); txObject.setSavepointAllowed(isNestedTransactionAllowed()); ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(this.dataSource); txObject.setConnectionHolder(conHolder, false); return txObject; }