Package org.springframework.transaction

Examples of org.springframework.transaction.TransactionSystemException


    }
    catch (IllegalStateException ex) {
      throw new NoTransactionException("No active JTA transaction");
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on setRollbackOnly", ex);
    }
  }
View Full Code Here


          "cannot register Spring after-completion callbacks with outer JTA transaction - " +
          "processing Spring after-completion callbacks with outcome status 'unknown'");
      invokeAfterCompletion(synchronizations, TransactionSynchronization.STATUS_UNKNOWN);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on registerSynchronization", ex);
    }
  }
View Full Code Here

    try {
      return (this.userTransaction != null &&
          this.userTransaction.getStatus() == Status.STATUS_MARKED_ROLLBACK);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on getStatus", ex);
    }
  }
View Full Code Here

    }
    catch (TransactionRolledBackException ex) {
      throw new UnexpectedRollbackException("JMS transaction rolled back", ex);
    }
    catch (JMSException ex) {
      throw new TransactionSystemException("Could not commit JMS transaction", ex);
    }
  }
View Full Code Here

        logger.debug("Rolling back JMS transaction on Session [" + session + "]");
      }
      session.rollback();
    }
    catch (JMSException ex) {
      throw new TransactionSystemException("Could not roll back JMS transaction", ex);
    }
  }
View Full Code Here

        DataAccessException dex = getJpaDialect().translateExceptionIfPossible((RuntimeException) ex.getCause());
        if (dex != null) {
          throw dex;
        }
      }
      throw new TransactionSystemException("Could not commit JPA transaction", ex);
    }
    catch (RuntimeException ex) {
      // Assumably failed to flush changes to database.
      throw DataAccessUtils.translateIfNecessary(ex, getJpaDialect());
    }
View Full Code Here

      if (tx.isActive()) {
        tx.rollback();
      }
    }
    catch (PersistenceException ex) {
      throw new TransactionSystemException("Could not roll back JPA transaction", ex);
    }
    finally {
      if (!txObject.isNewEntityManagerHolder()) {
        // Clear all pending inserts/updates/deletes in the EntityManager.
        // Necessary for pre-bound EntityManagers, to avoid inconsistent state.
View Full Code Here

        logger.debug("Retrieving JTA UserTransaction from JNDI location [" + userTransactionName + "]");
      }
      return getJndiTemplate().lookup(userTransactionName, UserTransaction.class);
    }
    catch (NamingException ex) {
      throw new TransactionSystemException(
          "JTA UserTransaction is not available at JNDI location [" + userTransactionName + "]", ex);
    }
  }
View Full Code Here

        logger.debug("Retrieving JTA TransactionManager from JNDI location [" + transactionManagerName + "]");
      }
      return getJndiTemplate().lookup(transactionManagerName, TransactionManager.class);
    }
    catch (NamingException ex) {
      throw new TransactionSystemException(
          "JTA TransactionManager is not available at JNDI location [" + transactionManagerName + "]", ex);
    }
  }
View Full Code Here

   * @see #setJndiTemplate
   * @see #setTransactionSynchronizationRegistryName
   */
  protected Object lookupTransactionSynchronizationRegistry(String registryName) throws TransactionSystemException {
    if (transactionSynchronizationRegistryClass == null) {
      throw new TransactionSystemException(
          "JTA 1.1 [" + TRANSACTION_SYNCHRONIZATION_REGISTRY_CLASS_NAME + "] API not available");
    }
    try {
      if (logger.isDebugEnabled()) {
        logger.debug("Retrieving JTA TransactionSynchronizationRegistry from JNDI location [" + registryName + "]");
      }
      return getJndiTemplate().lookup(registryName, transactionSynchronizationRegistryClass);
    }
    catch (NamingException ex) {
      throw new TransactionSystemException(
          "JTA TransactionSynchronizationRegistry is not available at JNDI location [" + registryName + "]", 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.