Package org.springframework.transaction

Examples of org.springframework.transaction.TransactionSystemException


        }
        try {
            txObject.getSessionHolder().getTransaction().commit();
        } catch (Exception ex) {
            // assumably from commit call to the underlying JCR repository
            throw new TransactionSystemException("Could not commit JCR transaction", ex);
        }
    }
View Full Code Here


            logger.debug("Rolling back JCR transaction on session [" + txObject.getSessionHolder().getSession() + "]");
        }
        try {
            txObject.getSessionHolder().getTransaction().rollback();
        } catch (Exception ex) {
            throw new TransactionSystemException("Could not roll back JCR transaction", ex);
        } finally {
            if (!txObject.isNewSessionHolder()) {
                // Clear all pending inserts/updates/deletes in the Session.
                // Necessary for pre-bound Sessions, to avoid inconsistent
                // state.
View Full Code Here

    try {
      txObject.getPersistenceBrokerHolder().getPersistenceBroker().commitTransaction();
    }
    catch (TransactionAbortedException ex) {
      // assumably from commit call to underlying JDBC connection
      throw new TransactionSystemException("Could not commit OJB transaction", ex);
    }
  }
View Full Code Here

      ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
      throw new CannotCreateTransactionException("Could not begin local CCI transaction", ex);
    }
    catch (ResourceException ex) {
      ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
      throw new TransactionSystemException("Unexpected failure on begin of CCI local transaction", ex);
    }
  }
View Full Code Here

    }
    try {
      con.getLocalTransaction().commit();
    }
    catch (LocalTransactionException ex) {
      throw new TransactionSystemException("Could not commit CCI local transaction", ex);
    }
    catch (ResourceException ex) {
      throw new TransactionSystemException("Unexpected failure on commit of CCI local transaction", ex);
    }
  }
View Full Code Here

    }
    try {
      con.getLocalTransaction().rollback();
    }
    catch (LocalTransactionException ex) {
      throw new TransactionSystemException("Could not roll back CCI local transaction", ex);
    }
    catch (ResourceException ex) {
      throw new TransactionSystemException("Unexpected failure on rollback of CCI local 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

    try {
      txObject.getObjectContainerHolder().getObjectContainer().commit();
    }
    catch (Exception ex) {
      // assumably from commit call to the underlying db4o container
      throw new TransactionSystemException("Could not commit db4o transaction", ex);
    }
  }
View Full Code Here

    }
    try {
      txObject.getObjectContainerHolder().getObjectContainer().rollback();
    }
    catch (Exception ex) {
      throw new TransactionSystemException("Could not roll back db4o transaction", ex);
    }
    finally {
      try {
        // TODO: refresh the container somehow
      }
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.