protected void ensureTransactionInProgress() { ensureThatState( getTransaction() != null && !getTransaction().getState().isComplete(), is(true), "No transaction in progress"); }
protected void ensureTransactionNotInProgress() { ensureThatState( getTransaction() != null && !getTransaction().getState().isComplete(), is(false), "Transaction in progress"); }
public boolean inTransaction() { return getTransaction() != null && !getTransaction().getState().isComplete(); }
public static boolean inTransaction() { return inSession() && getCurrentTransaction() != null && !getCurrentTransaction().getState().isComplete(); }