139140141142143144145146147148
} catch (Exception e) { return ResultType.ADD_FAIL; } finally { if (txn.isActive()) { _logger.info("Rolling back transaction"); txn.rollback(); } } } }
5152535455565758596061
logger.fatal(e.getMessage()); } catch (IllegalStateException e) { logger.fatal(e.getMessage()); } finally { if (txn.isActive()) { txn.rollback(); } } } public static void deleteEntity(Key key) {
7374757677787980818283
logger.fatal(e.getMessage()); } catch (IllegalStateException e) { logger.fatal(e.getMessage()); } finally { if (txn.isActive()) { txn.rollback(); } } } public static void deleteEntitys(Iterable<Key> keys) {
9596979899100101102103104105
logger.fatal(e.getMessage()); } catch (IllegalStateException e) { logger.fatal(e.getMessage()); } finally { if (txn.isActive()) { txn.rollback(); } } } /**
385386387388389390391392393394395
} catch (Exception e) { threw = true; } txn.rollback(); assertTrue(threw); } @Test public void asyncStoreMulti() throws ParseException, InterruptedException, ExecutionException
9293949596979899100101102
User user = service.put(tx, uid, name, mail, phone, zipcode, address); // ユーザ登録メール送信 if (!sendConfirmationMail(user)) { // メール送信失敗 tx.rollback(); return forward("/manager/regist.jsp"); } Datastore.put(user); // エラーが無ければ登録
359360361362363364365366367368369
DatastoreUtil.delete(ds, tx, key); tx.commit(); } } finally { if (tx.isActive()) { tx.rollback(); } } } /**
122123124125126127128129130131132
User user = getService().put(tx, uid, name, mail); // ユーザ登録メール送信 if (!sendConfirmationMail(user)) { // メール送信失敗 // 失敗したら、ユーザ登録は取りやめ tx.rollback(); // 登録画面を表示 return forward("/user/regist.jsp"); } Datastore.put(user);
288289290291292293294295296297298
513514515516517518519520521522523
DatastoreUtil.put(ds, tx, toEntity()); tx.commit(); return; } finally { if (tx.isActive()) { tx.rollback(); } } } /**