Search in sources :

Example 6 with InvalidTransactionException

use of javax.transaction.InvalidTransactionException in project tomee by apache.

the class JtaTransactionPolicy method resumeTransaction.

protected void resumeTransaction(final Transaction tx) throws SystemException {
    try {
        if (tx == null) {
            txLogger.debug("TX {0}: No transaction to resume", transactionType);
        } else {
            txLogger.debug("TX {0}: Resuming transaction {1}", transactionType, tx);
            transactionManager.resume(tx);
        }
    } catch (final InvalidTransactionException ite) {
        txLogger.error("Could not resume the client's transaction, the transaction is no longer valid: {0}", ite.getMessage());
        throw new SystemException(ite);
    } catch (final IllegalStateException e) {
        txLogger.error("Could not resume the client's transaction: {0}", e.getMessage());
        throw new SystemException(e);
    } catch (final javax.transaction.SystemException e) {
        txLogger.error("Could not resume the client's transaction: The transaction reported a system exception: {0}", e.getMessage());
        throw new SystemException(e);
    }
}
Also used : SystemException(org.apache.openejb.SystemException) InvalidTransactionException(javax.transaction.InvalidTransactionException)

Aggregations

InvalidTransactionException (javax.transaction.InvalidTransactionException)6 SystemException (javax.transaction.SystemException)4 HeuristicMixedException (javax.transaction.HeuristicMixedException)2 HeuristicRollbackException (javax.transaction.HeuristicRollbackException)2 RollbackException (javax.transaction.RollbackException)2 LocalTransaction (org.wildfly.transaction.client.LocalTransaction)2 LocalTransactionException (javax.resource.spi.LocalTransactionException)1 NotSupportedException (javax.transaction.NotSupportedException)1 Transaction (javax.transaction.Transaction)1 TransactionManager (javax.transaction.TransactionManager)1 XAException (javax.transaction.xa.XAException)1 CancelException (org.apache.geode.CancelException)1 LogWriterI18n (org.apache.geode.i18n.LogWriterI18n)1 SystemException (org.apache.openejb.SystemException)1 CacheException (org.infinispan.commons.CacheException)1 ContextTransactionManager (org.wildfly.transaction.client.ContextTransactionManager)1