Examples of TransactionAbortedException


Examples of com.sun.sgs.app.TransactionAbortedException

    @Test
    public void testAbortAbortedWithNonRetryableCause() throws Exception {
  Exception abortCause = new IllegalArgumentException();
  txn.abort(abortCause);
  try {
      txn.abort(new TransactionAbortedException("Aborted"));
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
      System.err.println(e);
      assertFalse(retryable(e));
      assertEquals(abortCause, e.getCause());
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

        abort(e);
    }
    throw e;
      }
      if (state == State.ABORTED) {
    throw new TransactionAbortedException(
        "Transaction has been aborted: " + abortCause, abortCause);
      }
  }
  state = State.COMMITTING;
  for (TransactionParticipant participant : participants) {
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

      abort(e);
        }
        throw e;
    }
    if (state == State.ABORTED) {
        throw new TransactionAbortedException(
      "Transaction has been aborted: " + abortCause,
      abortCause);
    }
      }
  }
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

    public void testRunRetryable() {
  SimpleRetryIoRunnable retry = new SimpleRetryIoRunnable(100, 0) {
      protected String callOnce() throws IOException {
    calls++;
    if (calls == 1) {
        throw new TransactionAbortedException("");
    }
    return "ok";
      }
  };
  retry.run();
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

        abort(e);
    }
    throw e;
      }
      if (state == State.ABORTED) {
    throw new TransactionAbortedException(
        "Transaction has been aborted: " + abortCause, abortCause);
      }
  }
  state = State.COMMITTING;
  for (TransactionParticipant participant : participants) {
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

      abort(e);
        }
        throw e;
    }
    if (state == State.ABORTED) {
        throw new TransactionAbortedException(
      "Transaction has been aborted: " + abortCause,
      abortCause);
    }
      }
  }
View Full Code Here

Examples of org.apache.ojb.broker.TransactionAbortedException

        }
        catch (SQLException e)
        {
            log.error("Commit on underlying connection failed, try to rollback connection", e);
            this.localRollback();
            throw new TransactionAbortedException("Commit on connection failed", e);
        }
        finally
        {
            this.isInLocalTransaction = false;
            restoreAutoCommitState();
View Full Code Here

Examples of org.apache.ojb.broker.TransactionAbortedException

        }
        catch (SQLException e)
        {
            log.error("Commit on underlying connection failed, try to rollback connection", e);
            this.localRollback();
            throw new TransactionAbortedException("Commit on connection failed", e);
        }
        finally
        {
            this.isInLocalTransaction = false;
            restoreAutoCommitState();
View Full Code Here

Examples of org.apache.ojb.broker.TransactionAbortedException

        }
        catch (SQLException e)
        {
            log.error("Commit on underlying connection failed, try to rollback connection", e);
            this.localRollback();
            throw new TransactionAbortedException("Commit on connection failed", e);
        }
        finally
        {
            this.isInLocalTransaction = false;
            restoreAutoCommitState();
View Full Code Here

Examples of org.apache.ojb.broker.TransactionAbortedException

        }
        catch (SQLException e)
        {
            log.error("Commit on underlying connection failed, try to rollback connection", e);
            this.localRollback();
            throw new TransactionAbortedException("Commit on connection failed", e);
        }
        finally
        {
            this.isInLocalTransaction = false;
            restoreAutoCommitState();
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.