Package com.sun.sgs.app

Examples of com.sun.sgs.app.TransactionNotActiveException


   * Throws a {@code TransactionNotActiveException} if this
   * transaction is prepared.
   */
  private void checkPrepared() {
      if (isPrepared) {
    throw new TransactionNotActiveException("Already prepared");
      }
  }
View Full Code Here


  checkThread("checkTimeout");
  logger.log(Level.FINEST, "checkTimeout {0}", this);
  switch (state) {
  case ABORTED:
  case COMMITTED:
      throw new TransactionNotActiveException(
    "Transaction is not active: " + state);
  case ABORTING:
  case COMMITTING:
      return;
  case ACTIVE:
View Full Code Here

           getParticipantInfo(participant));
  }
  if (participant == null) {
      throw new NullPointerException("Participant must not be null");
  } else if (state == State.ABORTED) {
      throw new TransactionNotActiveException(
    "Transaction is not active", abortCause);
  } else if (state != State.ACTIVE) {
      throw new IllegalStateException(
    "Transaction is not active: " + state);
  }
View Full Code Here

  case PREPARING:
      break;
  case ABORTING:
      return;
  case ABORTED:
      throw new TransactionNotActiveException(
    "Transaction is not active", abortCause);
  case COMMITTING:
  case COMMITTED:
      throw new IllegalStateException(
    "Transaction is not active: " + state, cause);
View Full Code Here

    public void registerListener(TransactionListener listener) {
  checkThread("registerListener");
  if (listener == null) {
      throw new NullPointerException("The listener must not be null");
  } else if (state != State.ACTIVE) {
      throw new TransactionNotActiveException(
    "Transaction is not active: " + state);
  }
  if (listeners == null) {
      listeners = new ArrayList<TransactionListener>();
      listeners.add(listener);
View Full Code Here

     */
    void commit() throws Exception {
  checkThread("commit");
  logger.log(Level.FINER, "commit {0}", this);
  if (state == State.ABORTED) {
      throw new TransactionNotActiveException(
    "Transaction is not active", abortCause);
  } else if (state != State.ACTIVE) {
      throw new IllegalStateException(
    "Transaction is not active: " + state);
  }
View Full Code Here

    {
  checkOid(oid);
  try {
      objectAccesses.reportObjectAccess(txn, oid, type);
  } catch (IllegalArgumentException e) {
      throw new TransactionNotActiveException(
          "Problem with transaction " + txn + ": " + e.getMessage(), e);
  }
    }
View Full Code Here

  Transaction txn, String name, AccessType type)
    {
  try {
      nameAccesses.reportObjectAccess(txn, getNameForAccess(name), type);
  } catch (IllegalArgumentException e) {
      throw new TransactionNotActiveException(
          "Problem with transaction " + txn + ": " + e.getMessage(), e);
  }
    }
View Full Code Here

TOP

Related Classes of com.sun.sgs.app.TransactionNotActiveException

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.