Package org.springframework.transaction

Examples of org.springframework.transaction.UnexpectedRollbackException


    if (multiTransactionStatus.isNewSynchonization()) {
      synchronizationManager.clearSynchronization();
    }

    if (rollbackException != null) {
      throw new UnexpectedRollbackException("Rollback exception, originated at (" + rollbackExceptionTransactionManager
          + ") " + rollbackException.getMessage(), rollbackException);
    }
  }
View Full Code Here


      }
      processRollback(defStatus);
      // Throw UnexpectedRollbackException only at outermost transaction boundary
      // or if explicitly asked to.
      if (status.isNewTransaction() || isFailEarlyOnGlobalRollbackOnly()) {
        throw new UnexpectedRollbackException(
            "Transaction rolled back because it has been marked as rollback-only");
      }
      return;
    }
View Full Code Here

          doCommit(status);
        }
        // Throw UnexpectedRollbackException if we have a global rollback-only
        // marker but still didn't get a corresponding exception from commit.
        if (globalRollbackOnly) {
          throw new UnexpectedRollbackException(
              "Transaction silently rolled back because it has been marked as rollback-only");
        }
      }
      catch (UnexpectedRollbackException ex) {
        // can only be caused by doCommit
View Full Code Here

      }
      processRollback(defStatus);
      // Throw UnexpectedRollbackException only at outermost transaction boundary
      // or if explicitly asked to.
      if (status.isNewTransaction() || isFailEarlyOnGlobalRollbackOnly()) {
        throw new UnexpectedRollbackException(
            "Transaction rolled back because it has been marked as rollback-only");
      }
      return;
    }
View Full Code Here

          doCommit(status);
        }
        // Throw UnexpectedRollbackException if we have a global rollback-only
        // marker but still didn't get a corresponding exception from commit.
        if (globalRollbackOnly) {
          throw new UnexpectedRollbackException(
              "Transaction silently rolled back because it has been marked as rollback-only");
        }
      }
      catch (UnexpectedRollbackException ex) {
        // can only be caused by doCommit
View Full Code Here

      }
      processRollback(defStatus);
      // Throw UnexpectedRollbackException only at outermost transaction boundary
      // or if explicitly asked to.
      if (status.isNewTransaction() || isFailEarlyOnGlobalRollbackOnly()) {
        throw new UnexpectedRollbackException(
            "Transaction rolled back because it has been marked as rollback-only");
      }
      return;
    }
View Full Code Here

          doCommit(status);
        }
        // Throw UnexpectedRollbackException if we have a global rollback-only
        // marker but still didn't get a corresponding exception from commit.
        if (globalRollbackOnly) {
          throw new UnexpectedRollbackException(
              "Transaction silently rolled back because it has been marked as rollback-only");
        }
      }
      catch (UnexpectedRollbackException ex) {
        // can only be caused by doCommit
View Full Code Here

     * cause a runtime error when you reach the final end transaction statement.
     * <p>
     * @param pRaiseException
     */
    public static void abortNested(boolean pRaiseException) {
      TransactionMgr.abortNested(pRaiseException, new UnexpectedRollbackException("TransactionMgr.abortNested invoked"));
    }
View Full Code Here

     * cause a runtime error when you reach the final end transaction statement.
     * <p>
     * @param pRaiseException
     */
    public static void abort(boolean pRaiseException) {
      TransactionMgr.abort(pRaiseException, new UnexpectedRollbackException("TransactionMgr.abort invoked"));
    }
View Full Code Here

    JtaTransactionObject txObject = (JtaTransactionObject) status.getTransaction();
    try {
      txObject.getUserTransaction().commit();
    }
    catch (RollbackException ex) {
      throw new UnexpectedRollbackException(
          "JTA transaction unexpectedly rolled back (maybe due to a timeout)", ex);
    }
    catch (HeuristicMixedException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_MIXED, ex);
    }
View Full Code Here

TOP

Related Classes of org.springframework.transaction.UnexpectedRollbackException

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.