Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Transaction.rollback()


    } catch (Exception e) {
      return ResultType.ADD_FAIL;
    } finally {
      if (txn.isActive()) {
        _logger.info("Rolling back transaction");
        txn.rollback();
      }
    }
  }
}
View Full Code Here


      logger.fatal(e.getMessage());
    } catch (IllegalStateException e) {
      logger.fatal(e.getMessage());
    } finally {
      if (txn.isActive()) {
        txn.rollback();
      }
    }
  }
 
  public static void deleteEntity(Key key) {
View Full Code Here

      logger.fatal(e.getMessage());
    } catch (IllegalStateException e) {
      logger.fatal(e.getMessage());
    } finally {
      if (txn.isActive()) {
        txn.rollback();
      }
    }
  } 
 
  public static void deleteEntitys(Iterable<Key> keys) {
View Full Code Here

      logger.fatal(e.getMessage());
    } catch (IllegalStateException e) {
      logger.fatal(e.getMessage());
    } finally {
      if (txn.isActive()) {
        txn.rollback();
      }
    }
  }
 
  /**
 
View Full Code Here

    }
    catch (Exception e)
    {
      threw = true;
      }
    txn.rollback();
    assertTrue(threw);
  }

  @Test
  public void asyncStoreMulti() throws ParseException, InterruptedException, ExecutionException
View Full Code Here

                User user =
                    service.put(tx, uid, name, mail, phone, zipcode, address);
                // ユーザ登録メール送信
                if (!sendConfirmationMail(user)) {
                    // メール送信失敗
                    tx.rollback();
                    return forward("/manager/regist.jsp");
                }

                Datastore.put(user);
                // エラーが無ければ登録
View Full Code Here

                DatastoreUtil.delete(ds, tx, key);
                tx.commit();
            }
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
        }
    }

    /**
 
View Full Code Here

                    User user = getService().put(tx, uid, name, mail);
                    // ユーザ登録メール送信
                    if (!sendConfirmationMail(user)) {
                        // メール送信失敗
                        // 失敗したら、ユーザ登録は取りやめ
                        tx.rollback();
                        // 登録画面を表示
                        return forward("/user/regist.jsp");
                    }
                   
                    Datastore.put(user);
View Full Code Here

                DatastoreUtil.delete(ds, tx, key);
                tx.commit();
            }
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
        }
    }

    /**
 
View Full Code Here

            DatastoreUtil.put(ds, tx, toEntity());
            tx.commit();
            return;
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
        }
    }

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