Package org.springframework.transaction

Examples of org.springframework.transaction.TransactionSystemException


    JtaTransactionObject txObject = (JtaTransactionObject) transaction;
    try {
      return (txObject.getUserTransaction().getStatus() != Status.STATUS_NO_TRANSACTION);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on getStatus", ex);
    }
  }
View Full Code Here


    JtaTransactionObject txObject = (JtaTransactionObject) transaction;
    try {
      return doJtaSuspend(txObject);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on suspend", ex);
    }
  }
View Full Code Here

    }
    catch (InvalidTransactionException ex) {
      throw new IllegalTransactionStateException("Tried to resume invalid JTA transaction", ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on resume", ex);
    }
  }
View Full Code Here

    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on commit", ex);
    }
  }
View Full Code Here

            if (logger.isDebugEnabled()) {
              logger.debug("Rollback failure with transaction already marked as rolled back: " + ex);
            }
          }
          else {
            throw new TransactionSystemException("Unexpected internal transaction state", ex);
          }
        }
      }
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on rollback", ex);
    }
  }
View Full Code Here

      if (jtaStatus != Status.STATUS_NO_TRANSACTION && jtaStatus != Status.STATUS_ROLLEDBACK) {
        txObject.getUserTransaction().setRollbackOnly();
      }
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on setRollbackOnly", ex);
    }
  }
View Full Code Here

    logger.debug("Registering after-completion synchronization with existing JTA transaction");
    try {
      doRegisterAfterCompletionWithJtaTransaction(txObject, synchronizations);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on registerSynchronization", ex);
    }
    catch (Exception ex) {
      // Note: JBoss throws plain RuntimeException with RollbackException as cause.
      if (ex instanceof RollbackException || ex.getCause() instanceof RollbackException) {
        logger.debug("Participating in existing JTA transaction that has been marked for rollback: " +
View Full Code Here

    try {
      txObject.getSessionHolder().getTransaction().commit();
    }
    catch (org.hibernate.TransactionException ex) {
      // assumably from commit call to the underlying JDBC connection
      throw new TransactionSystemException("Could not commit Hibernate transaction", ex);
    }
    catch (HibernateException ex) {
      // assumably failed to flush changes to database
      throw convertHibernateAccessException(ex);
    }
View Full Code Here

    }
    try {
      txObject.getSessionHolder().getTransaction().rollback();
    }
    catch (org.hibernate.TransactionException ex) {
      throw new TransactionSystemException("Could not roll back Hibernate transaction", ex);
    }
    catch (HibernateException ex) {
      // Shouldn't really happen, as a rollback doesn't cause a flush.
      throw convertHibernateAccessException(ex);
    }
View Full Code Here

    try {
      txObject.getSessionHolder().getTransaction().commit();
    }
    catch (org.hibernate.TransactionException ex) {
      // assumably from commit call to the underlying JDBC connection
      throw new TransactionSystemException("Could not commit Hibernate transaction", ex);
    }
    catch (HibernateException ex) {
      // assumably failed to flush changes to database
      throw convertHibernateAccessException(ex);
    }
View Full Code Here

TOP

Related Classes of org.springframework.transaction.TransactionSystemException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.