Package org.springframework.transaction

Examples of org.springframework.transaction.HeuristicCompletionException


    if (commitException != null) {
      boolean firstTransactionManagerFailed = commitExceptionTransactionManager == getLastTransactionManager();
      int transactionState = firstTransactionManagerFailed ? HeuristicCompletionException.STATE_ROLLED_BACK
          : HeuristicCompletionException.STATE_MIXED;
      throw new HeuristicCompletionException(transactionState, commitException);
    }
  }
View Full Code Here


    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
View Full Code Here

    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (SystemException ex) {
      throw new TransactionSystemException("JTA failure on commit", ex);
    }
  }
View Full Code Here

    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
View Full Code Here

    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
View Full Code Here

    if (commitException != null) {
      boolean firstTransactionManagerFailed = commitExceptionTransactionManager == getLastTransactionManager();
      int transactionState = firstTransactionManagerFailed ? HeuristicCompletionException.STATE_ROLLED_BACK
          : HeuristicCompletionException.STATE_MIXED;
      throw new HeuristicCompletionException(transactionState, commitException);
    }
  }
View Full Code Here

                    throw (javax.transaction.SystemException) cause;
                }

                // convert to JTA exception
                if (e instanceof HeuristicCompletionException) {
                    HeuristicCompletionException heuristicCompletionException = (HeuristicCompletionException) e;
                    if (heuristicCompletionException.getOutcomeState() == HeuristicCompletionException.STATE_MIXED) {
                        throw createJtaException(HeuristicMixedException.class, e);
                    } else if (heuristicCompletionException.getOutcomeState() == HeuristicCompletionException.STATE_ROLLED_BACK) {
                        throw createJtaException(HeuristicRollbackException.class, e);
                    }
                } else if (e instanceof UnexpectedRollbackException) {
                    throw createJtaException(RollbackException.class, e);
                }
View Full Code Here

    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
View Full Code Here

    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
View Full Code Here

    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);
    }
    catch (HeuristicRollbackException ex) {
      throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
    }
    catch (IllegalStateException ex) {
      throw new TransactionSystemException("Unexpected internal transaction state", ex);
    }
    catch (SystemException ex) {
View Full Code Here

TOP

Related Classes of org.springframework.transaction.HeuristicCompletionException

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.