Examples of IllegalTransactionStateException


Examples of org.springframework.transaction.IllegalTransactionStateException

  protected void doBegin(Object transaction, TransactionDefinition definition) {
    JdoTransactionObject txObject = (JdoTransactionObject) transaction;

    if (txObject.hasConnectionHolder() && !txObject.getConnectionHolder().isSynchronizedWithTransaction()) {
      throw new IllegalTransactionStateException(
          "Pre-bound JDBC Connection found! JdoTransactionManager does not support " +
          "running within DataSourceTransactionManager if told to manage the DataSource itself. " +
          "It is recommended to use a single JdoTransactionManager for all transactions " +
          "on a single DataSource, no matter whether JDO or JDBC access.");
    }
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

    JtaTransactionObject txObject = (JtaTransactionObject) transaction;
    try {
      doJtaResume(txObject, suspendedResources);
    }
    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) {
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

  protected void doBegin(Object transaction, TransactionDefinition definition) {
    HibernateTransactionObject txObject = (HibernateTransactionObject) transaction;

    if (txObject.hasConnectionHolder() && !txObject.getConnectionHolder().isSynchronizedWithTransaction()) {
      throw new IllegalTransactionStateException(
          "Pre-bound JDBC Connection found! HibernateTransactionManager does not support " +
          "running within DataSourceTransactionManager if told to manage the DataSource itself. " +
          "It is recommended to use a single HibernateTransactionManager for all transactions " +
          "on a single DataSource, no matter whether Hibernate or JDBC access.");
    }
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

  protected void doBegin(Object transaction, TransactionDefinition definition) {
    JpaTransactionObject txObject = (JpaTransactionObject) transaction;

    if (txObject.hasConnectionHolder() && !txObject.getConnectionHolder().isSynchronizedWithTransaction()) {
      throw new IllegalTransactionStateException(
          "Pre-bound JDBC Connection found! JpaTransactionManager does not support " +
          "running within DataSourceTransactionManager if told to manage the DataSource itself. " +
          "It is recommended to use a single JpaTransactionManager for all transactions " +
          "on a single DataSource, no matter whether JPA or JDBC access.");
    }
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

  protected void doBegin(Object transaction, TransactionDefinition definition) {
    HibernateTransactionObject txObject = (HibernateTransactionObject) transaction;

    if (txObject.hasConnectionHolder() && !txObject.getConnectionHolder().isSynchronizedWithTransaction()) {
      throw new IllegalTransactionStateException(
          "Pre-bound JDBC Connection found! HibernateTransactionManager does not support " +
          "running within DataSourceTransactionManager if told to manage the DataSource itself. " +
          "It is recommended to use a single HibernateTransactionManager for all transactions " +
          "on a single DataSource, no matter whether Hibernate or JDBC access.");
    }
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

      throw new InvalidTimeoutException("Invalid transaction timeout", definition.getTimeout());
    }

    // No existing transaction found -> check propagation behavior to find out how to proceed.
    if (definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_MANDATORY) {
      throw new IllegalTransactionStateException(
          "No existing transaction found for transaction marked with propagation 'mandatory'");
    }
    else if (definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_REQUIRED ||
        definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_REQUIRES_NEW ||
        definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_NESTED) {
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

  private TransactionStatus handleExistingTransaction(
      TransactionDefinition definition, Object transaction, boolean debugEnabled)
      throws TransactionException {

    if (definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_NEVER) {
      throw new IllegalTransactionStateException(
          "Existing transaction found for transaction marked with propagation 'never'");
    }

    if (definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_NOT_SUPPORTED) {
      if (debugEnabled) {
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

   * @see #doCommit
   * @see #rollback
   */
  public final void commit(TransactionStatus status) throws TransactionException {
    if (status.isCompleted()) {
      throw new IllegalTransactionStateException(
          "Transaction is already completed - do not call commit or rollback more than once per transaction");
    }

    DefaultTransactionStatus defStatus = (DefaultTransactionStatus) status;
    if (defStatus.isLocalRollbackOnly()) {
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

   * @see #doRollback
   * @see #doSetRollbackOnly
   */
  public final void rollback(TransactionStatus status) throws TransactionException {
    if (status.isCompleted()) {
      throw new IllegalTransactionStateException(
          "Transaction is already completed - do not call commit or rollback more than once per transaction");
    }

    DefaultTransactionStatus defStatus = (DefaultTransactionStatus) status;
    processRollback(defStatus);
View Full Code Here

Examples of org.tamacat.sql.IllegalTransactionStateException

      }
    }
   
    protected void endTransaction() throws DaoException {
      if (isTransactionStarted() == false) {
        throw new IllegalTransactionStateException("Transaction is not started.");
      }
      if (TransactionStateManager.getInstance().isNotCommited()) {
        rollback();
        abortTransaction();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.