Exemplo n.º 1
0
  /** {@inheritDoc} */
  @Override
  public void rollback() throws GridException {
    enter();

    try {
      tx.rollback();
    } finally {
      leave();
    }
  }
  /** Roll backs current transaction. */
  private void rollbackCurrentTx() {
    try {
      TxContext ctx = txCtx.get();

      if (ctx != null) {
        txCtx.remove();

        GridCacheTx tx = cache.tx();

        if (tx != null) tx.rollback();
      }
    } catch (GridException e) {
      log.error("Failed to rollback cache transaction.", e);
    }
  }