/** * Convenience method, returning the {@link MessageBroker} of the {@link #getCurrentTransaction() current * transaction}. */ public static MessageBroker getMessageBroker() { return getCurrentTransaction().getMessageBroker(); }
/** * Convenience method returning the {@link UpdateNotifier} * of the {@link #getTransaction() current transaction}. */ protected UpdateNotifier getUpdateNotifier() { return getTransaction().getUpdateNotifier(); }
public void takeSnapshot() { if (!LOG.isDebugEnabled()) { return; } final DebugString debug = new DebugString(); debug(debug); debug.indent(); debug.appendln(); debug(debug, getPersistenceSession()); if (getCurrentTransaction() != null) { debug(debug, getCurrentTransaction().getUpdateNotifier()); debug(debug, getCurrentTransaction().getMessageBroker()); } debugSnapshot = debug.toString(); LOG.debug(debugSnapshot); }
protected void ensureTransactionInProgress() { ensureThatState( getTransaction() != null && !getTransaction().getState().isComplete(), is(true), "No transaction in progress"); }
public void appendState(final ToString asString) { asString.append("authenticationSession", getAuthenticationSession()); asString.append("persistenceSession", getPersistenceSession()); asString.append("transaction", getCurrentTransaction()); if (getCurrentTransaction() != null) { asString.append("messageBroker", getCurrentTransaction().getMessageBroker()); asString.append("updateNotifier", getCurrentTransaction().getUpdateNotifier()); } }
protected void ensureTransactionNotInProgress() { ensureThatState( getTransaction() != null && !getTransaction().getState().isComplete(), is(false), "Transaction in progress"); }
public void debugState(final DebugString debug) { debug.appendln("authenticationSession", getAuthenticationSession()); debug.appendln("persistenceSession", getPersistenceSession()); debug.appendln("transaction", getCurrentTransaction()); if (getCurrentTransaction() != null) { debug.appendln("messageBroker", getCurrentTransaction().getMessageBroker()); debug.appendln("updateNotifier", getCurrentTransaction().getUpdateNotifier()); } }
public boolean inTransaction() { return getTransaction() != null && !getTransaction().getState().isComplete(); }
/** * Convenience method, returning the {@link UpdateNotifier} of the {@link #getCurrentTransaction() current * transaction}. */ public static UpdateNotifier getUpdateNotifier() { return getCurrentTransaction().getUpdateNotifier(); }
/** * Convenience method returning the {@link MessageBroker} * of the {@link #getTransaction() current transaction}. */ protected MessageBroker getMessageBroker() { return getTransaction().getMessageBroker(); }
public static boolean inTransaction() { return inSession() && getCurrentTransaction() != null && !getCurrentTransaction().getState().isComplete(); }