use of cn.taketoday.transaction.TransactionSuspensionNotSupportedException in project today-infrastructure by TAKETODAY.
the class JtaTransactionManager method doJtaResume.
/**
* Perform a JTA resume on the JTA TransactionManager.
* <p>Can be overridden in subclasses, for specific JTA implementations.
*
* @param txObject the JtaTransactionObject containing the UserTransaction
* @param suspendedTransaction the suspended JTA Transaction object
* @throws InvalidTransactionException if thrown by JTA methods
* @throws SystemException if thrown by JTA methods
* @see #getTransactionManager()
* @see TransactionManager#resume(Transaction)
*/
protected void doJtaResume(@Nullable JtaTransactionObject txObject, Object suspendedTransaction) throws InvalidTransactionException, SystemException {
TransactionManager transactionManager = getTransactionManager();
if (transactionManager == null) {
throw new TransactionSuspensionNotSupportedException("JtaTransactionManager needs a JTA TransactionManager for suspending a transaction: " + "specify the 'transactionManager' or 'transactionManagerName' property");
}
transactionManager.resume((Transaction) suspendedTransaction);
}
use of cn.taketoday.transaction.TransactionSuspensionNotSupportedException in project today-framework by TAKETODAY.
the class JtaTransactionManager method doJtaResume.
/**
* Perform a JTA resume on the JTA TransactionManager.
* <p>Can be overridden in subclasses, for specific JTA implementations.
*
* @param txObject the JtaTransactionObject containing the UserTransaction
* @param suspendedTransaction the suspended JTA Transaction object
* @throws InvalidTransactionException if thrown by JTA methods
* @throws SystemException if thrown by JTA methods
* @see #getTransactionManager()
* @see TransactionManager#resume(Transaction)
*/
protected void doJtaResume(@Nullable JtaTransactionObject txObject, Object suspendedTransaction) throws InvalidTransactionException, SystemException {
TransactionManager transactionManager = getTransactionManager();
if (transactionManager == null) {
throw new TransactionSuspensionNotSupportedException("JtaTransactionManager needs a JTA TransactionManager for suspending a transaction: " + "specify the 'transactionManager' or 'transactionManagerName' property");
}
transactionManager.resume((Transaction) suspendedTransaction);
}
Aggregations