Examples of TransactionAbortedException


Examples of com.foundationdb.server.error.TransactionAbortedException

            ServerStatement.TransactionAbortedMode abortedMode = stmt.getTransactionAbortedMode();
            switch (abortedMode) {
                case ALLOWED:
                    break;
                case NOT_ALLOWED:
                    throw new TransactionAbortedException();
                default:
                    throw new IllegalStateException("Unknown mode: " + abortedMode);
            }
        }
        return localTransaction;
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

        "Transaction timed out: " + e.getMessage(), e);
      } else if (errorCode == XA_RBDEADLOCK) {
    throw new TransactionConflictException(
        "Transaction conflict: " + e.getMessage(), e);
      } else if (errorCode >= XA_RBBASE && errorCode <= XA_RBEND) {
    throw new TransactionAbortedException(
        "Transaction aborted: " + e.getMessage(), e);
      }
  }
  throw new DbDatabaseException(
      "Unexpected database exception: " + e, e);
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

        ", objectId:" + objectId +
        descriptionMsg +
        " failed: ";
    String conflictMsg = ", with conflicting transaction " +
        conflict.getConflictingTransaction();
    TransactionAbortedException exception;
    switch (conflict.getType()) {
    case TIMEOUT:
        exception = new TransactionTimeoutException(
      accessMsg + "Transaction timed out" + conflictMsg);
        break;
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

        " failed: ";
    LockerImpl conflictingLocker =
        (LockerImpl) conflict.getConflictingLocker();
    String conflictMsg = ", with conflicting transaction " +
        conflictingLocker.getTransaction();
    TransactionAbortedException exception;
    switch (conflict.getType()) {
    case TIMEOUT:
        exception = new TransactionTimeoutException(
      accessMsg + "Transaction timed out" + conflictMsg);
        break;
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

        "Transaction timed out: " + e.getMessage(), e);
      } else if (errorCode == XA_RBDEADLOCK) {
    throw new TransactionConflictException(
        "Transaction conflict: " + e.getMessage(), e);
      } else if (errorCode >= XA_RBBASE && errorCode <= XA_RBEND) {
    throw new TransactionAbortedException(
        "Transaction aborted: " + e.getMessage(), e);
      }
  }
  throw new DbDatabaseException(
      "Unexpected database exception: " + e, e);
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

  assertCommitted();
    }

    @Test
    public void testCommitAbortedWithRetryableCause() throws Exception {
  Exception abortCause = new TransactionAbortedException("Aborted");
  txn.abort(abortCause);
  try {
      handle.commit();
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

    @Test
    public void testJoinAbortedWithRetryableCause() throws Exception {
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant();
  Exception abortCause = new TransactionAbortedException("Aborted");
  txn.abort(abortCause);
  try {
      txn.join(participant);
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
View Full Code Here

Examples of com.sun.sgs.app.TransactionAbortedException

  assertAborted(abortCause);
    }

    @Test
    public void testAbortAbortedWithRetryableCause() throws Exception {
  Exception abortCause = new TransactionAbortedException("Aborted");
  txn.abort(abortCause);
  try {
      txn.abort(new IllegalArgumentException());
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
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.