Examples of TransactionNotActiveException


Examples of com.sun.sgs.app.TransactionNotActiveException

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

Examples of com.sun.sgs.app.TransactionNotActiveException

      throw new IllegalStateException("Wrong transaction");
        }
        t.setTxnInfo(null);
        return info;
    }
    throw new TransactionNotActiveException(
        "Transaction is not active");
      }
View Full Code Here

Examples of com.sun.sgs.app.TransactionNotActiveException

  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

Examples of com.sun.sgs.app.TransactionNotActiveException

           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

Examples of com.sun.sgs.app.TransactionNotActiveException

  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

Examples of com.sun.sgs.app.TransactionNotActiveException

    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

Examples of com.sun.sgs.app.TransactionNotActiveException

  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

Examples of com.sun.sgs.app.TransactionNotActiveException

  }
  /* 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

Examples of com.sun.sgs.app.TransactionNotActiveException

     */
    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

Examples of com.sun.sgs.app.TransactionNotActiveException

  /** {@inheritDoc} */
  public boolean prepare(Transaction txn) throws Exception {
      try {
    T context = contextMap.checkTransaction(txn);
    if (context.isPrepared()) {
        throw new TransactionNotActiveException("Already prepared");
    }
    boolean readOnly = context.prepare();
    if (readOnly) {
        contextMap.clearContext();
    }
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.