Package com.avaje.ebeaninternal.server.transaction.TransactionMap

Examples of com.avaje.ebeaninternal.server.transaction.TransactionMap.State


  /**
   * Return the current Transaction for this serverName and Thread.
   */
  public static SpiTransaction get(String serverName) {
    TransactionMap map = local.get();
    State state = map.getState(serverName);
    SpiTransaction t = (state == null) ? null : state.transaction;
    if (map.isEmpty()) {
      local.remove();
    }
    return t;
View Full Code Here


  /**
   * Commit the current transaction.
   */
  public static void commit(String serverName) {
    TransactionMap map = local.get();
    State state = map.removeState(serverName);
    if (state == null) {
      throw new IllegalStateException("No current transaction for [" + serverName + "]");
    }
    state.commit();
    if (map.isEmpty()) {
      local.remove();
    }
  }
View Full Code Here

  /**
   * Rollback the current transaction.
   */
  public static void rollback(String serverName) {
    TransactionMap map = local.get();
    State state = map.removeState(serverName);
    if (state == null) {
      throw new IllegalStateException("No current transaction for [" + serverName + "]");
    }
    state.rollback();
    if (map.isEmpty()) {
      local.remove();
    }
  }
View Full Code Here

   * </p>
   */
  public static void end(String serverName) {

    TransactionMap map = local.get();
    State state = map.removeState(serverName);
    if (state != null) {
      state.end();
    }
    if (map.isEmpty()) {
      local.remove();
    }
  }
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.server.transaction.TransactionMap.State

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.