Package com.sun.sgs.app

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


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

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

     * TransactionNotActiveException if it isn't.
     */
    static void checkTransaction(Transaction txn) {
  Transaction currentTxn = txnProxy.getCurrentTransaction();
  if (currentTxn != txn) {
      throw new TransactionNotActiveException(
     "mismatched transaction; expected " + currentTxn + ", got " +
    txn);
  }
    }
View Full Code Here

     * TransactionNotActiveException if it isn't.
     */
    static void checkTransaction(Transaction txn) {
  Transaction currentTxn = txnProxy.getCurrentTransaction();
  if (currentTxn != txn) {
      throw new TransactionNotActiveException(
     "mismatched transaction; expected " + currentTxn + ", got " +
    txn);
  }
    }
View Full Code Here

     * TransactionNotActiveException if it isn't.
     */
    static void checkTransaction(Transaction txn) {
  Transaction currentTxn = txnProxy.getCurrentTransaction();
  if (currentTxn != txn) {
      throw new TransactionNotActiveException(
     "mismatched transaction; expected " + currentTxn + ", got " +
    txn);
  }
    }
View Full Code Here

      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

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.