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