Package com.sun.sgs.app

Examples of com.sun.sgs.app.TransactionNotActiveException


      return timeout;
  }

  public void checkTimeout() {
      if (inactive) {
    throw new TransactionNotActiveException(
        "The transaction is not active");
      } else if ((state.get() & PREPARED) != 0) {
    return;
      }
      long runningTime = System.currentTimeMillis() - getCreationTime();
View Full Code Here


    }
    if (!txn.getReaping()) {
        return txn;
    }
      }
      throw new TransactionNotActiveException(
    "Transaction is not active");
  }
View Full Code Here

    @SuppressWarnings("unchecked")
        T info = (T) t.getTxnInfo();
    if (info != null) {
        return info;
    }
    throw new TransactionNotActiveException(
        "Transaction is not active");
      }
View Full Code Here

      throw new IllegalStateException("Wrong transaction");
        }
        t.setTxnInfo(null);
        return info;
    }
    throw new TransactionNotActiveException(
        "Transaction is not active");
      }
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

  if (contextFactory == null) {
      throw new NullPointerException("null contextFactory");
  }
        Transaction txn = txnProxy.getCurrentTransaction();
        if (txn == null) {
            throw new TransactionNotActiveException(
                "No transaction is active");
        }
        T context = currentContext.get();
        if (context == null) {
            if (logger.isLoggable(Level.FINER)) {
View Full Code Here

  }
  /* Make sure the current transaction is active */
  txnProxy.getCurrentTransaction();
  T threadContext = currentContext.get();
  if (threadContext == null) {
      throw new TransactionNotActiveException(
    "Transaction " + context.getTransaction() +
    " is not the current transaction");
  } else if (context != threadContext) {
      throw new TransactionNotActiveException(
                "Wrong transaction: Expected " +
    context.getTransaction() + ", found " +
    threadContext.getTransaction());
  }
    }
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.