@Override public ActionQueue.TransactionCompletionProcesses getTransactionCompletionProcesses() { return shareTransactionContext ? session.getActionQueue().getTransactionCompletionProcesses() : null; }
@Override protected boolean shouldCloseJdbcCoordinatorOnClose(boolean isTransactionCoordinatorShared) { if ( !isTransactionCoordinatorShared ) { return super.shouldCloseJdbcCoordinatorOnClose( isTransactionCoordinatorShared ); } if ( getActionQueue().hasBeforeTransactionActions() || getActionQueue().hasAfterTransactionActions() ) { log.warn( "On close, shared Session had before/after transaction actions that have not yet been processed" ); } return false; }
protected void flushJpaSession() { SessionImpl session = (SessionImpl) myEntityManager.unwrap(Session.class); int insertionCount = session.getActionQueue().numberOfInsertions(); int updateCount = session.getActionQueue().numberOfUpdates(); StopWatch sw = new StopWatch(); myEntityManager.flush(); ourLog.debug("Session flush took {}ms for {} inserts and {} updates", sw.getMillis(), insertionCount, updateCount); }
protected void flushJpaSession() { SessionImpl session = (SessionImpl) myEntityManager.unwrap(Session.class); int insertionCount = session.getActionQueue().numberOfInsertions(); int updateCount = session.getActionQueue().numberOfUpdates(); StopWatch sw = new StopWatch(); myEntityManager.flush(); ourLog.debug("Session flush took {}ms for {} inserts and {} updates", sw.getMillis(), insertionCount, updateCount); }
@Override public ActionQueue.TransactionCompletionProcesses getTransactionCompletionProcesses() { return shareTransactionContext ? session.getActionQueue().getTransactionCompletionProcesses() : null; }
protected void flushJpaSession() { SessionImpl session = (SessionImpl) myEntityManager.unwrap(Session.class); int insertionCount = session.getActionQueue().numberOfInsertions(); int updateCount = session.getActionQueue().numberOfUpdates(); StopWatch sw = new StopWatch(); myEntityManager.flush(); ourLog.debug("Session flush took {}ms for {} inserts and {} updates", sw.getMillis(), insertionCount, updateCount); }
protected void flushJpaSession() { SessionImpl session = (SessionImpl) myEntityManager.unwrap(Session.class); int insertionCount = session.getActionQueue().numberOfInsertions(); int updateCount = session.getActionQueue().numberOfUpdates(); StopWatch sw = new StopWatch(); myEntityManager.flush(); ourLog.debug("Session flush took {}ms for {} inserts and {} updates", sw.getMillis(), insertionCount, updateCount); }
@Override protected boolean shouldCloseJdbcCoordinatorOnClose(boolean isTransactionCoordinatorShared) { if ( !isTransactionCoordinatorShared ) { return super.shouldCloseJdbcCoordinatorOnClose( isTransactionCoordinatorShared ); } if ( getActionQueue().hasBeforeTransactionActions() || getActionQueue().hasAfterTransactionActions() ) { log.warn( "On close, shared Session had before/after transaction actions that have not yet been processed" ); } return false; }