Package org.springframework.transaction

Examples of org.springframework.transaction.CannotCreateTransactionException


      closeEntityManagerAfterFailedBegin(txObject);
      throw ex;
    }
    catch (Exception ex) {
      closeEntityManagerAfterFailedBegin(txObject);
      throw new CannotCreateTransactionException("Could not open JPA EntityManager for transaction", ex);
    }
  }
View Full Code Here


   */
  @Override
  protected Object doGetTransaction() {
    UserTransaction ut = getUserTransaction();
    if (ut == null) {
      throw new CannotCreateTransactionException("No JTA UserTransaction available - " +
          "programmatic PlatformTransactionManager.getTransaction usage not supported");
    }
    if (!this.cacheUserTransaction) {
      ut = lookupUserTransaction(
          this.userTransactionName != null ? this.userTransactionName : DEFAULT_USER_TRANSACTION_NAME);
View Full Code Here

      // assume nested transaction not supported
      throw new NestedTransactionNotSupportedException(
          "JTA implementation does not support nested transactions", ex);
    }
    catch (SystemException ex) {
      throw new CannotCreateTransactionException("JTA failure on begin", ex);
    }
  }
View Full Code Here

        }
        finally {
          SessionFactoryUtils.closeSession(session);
        }
      }
      throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex);
    }
  }
View Full Code Here

      TransactionSynchronizationManager.bindResource(getSessionFactory(), txObject.getSessionHolder());
    }

    catch (Exception ex) {
      SessionFactoryUtils.releaseSession(session, getSessionFactory());
      throw new CannotCreateTransactionException("Could not open TopLink Session for transaction", ex);
    }
  }
View Full Code Here

    catch (Exception ex) {
      if (txObject.isNewSessionHolder()) {
        SessionFactoryUtils.closeSession(session);
      }
      throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex);
    }
  }
View Full Code Here

   * @see #setCacheUserTransaction
   */
  protected Object doGetTransaction() {
    UserTransaction ut = getUserTransaction();
    if (ut == null) {
      throw new CannotCreateTransactionException("No JTA UserTransaction available - " +
          "programmatic PlatformTransactionManager.getTransaction usage not supported");
    }
    if (!this.cacheUserTransaction) {
      ut = lookupUserTransaction(
          this.userTransactionName != null ? this.userTransactionName : DEFAULT_USER_TRANSACTION_NAME);
View Full Code Here

      // assume nested transaction not supported
      throw new NestedTransactionNotSupportedException(
          "JTA implementation does not support nested transactions", ex);
    }
    catch (SystemException ex) {
      throw new CannotCreateTransactionException("JTA failure on begin", ex);
    }
  }
View Full Code Here

      PersistenceManagerFactoryUtils.releasePersistenceManager(pm, getPersistenceManagerFactory());
      throw ex;
    }
    catch (Exception ex) {
      PersistenceManagerFactoryUtils.releasePersistenceManager(pm, getPersistenceManagerFactory());
      throw new CannotCreateTransactionException("Could not open JDO PersistenceManager for transaction", ex);
    }
  }
View Full Code Here

    }
    try {
      return conHolder.createSavepoint();
    }
    catch (Throwable ex) {
      throw new CannotCreateTransactionException("Could not create JDBC savepoint", ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.transaction.CannotCreateTransactionException

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.