예제 #1
0
 private void ensureInTransaction() {
   if (transactionMode == TransactionMode.UNCHAINED) {
     ensureThatContext(IsisContext.inTransaction(), is(true));
     ensureInHibernateTransaction();
   } else {
     ensureInSession();
     if (IsisContext.inTransaction()) {
       ensureInHibernateTransaction();
     } else {
       getTransactionManager().startTransaction();
     }
   }
 }
예제 #2
0
 private void ensureNotInTransaction() {
   ensureInSession();
   ensureThatContext(IsisContext.inTransaction(), is(false));
 }
예제 #3
0
 private void ensureInSession() {
   ensureThatContext(IsisContext.inSession(), is(true));
 }