@Override protected void performExecutions(EventSource session) throws HibernateException { session.getPersistenceContext().setFlushing(true); try { session.getJDBCContext().getConnectionManager().flushBeginning(); // we need to lock the collection caches before // executing entity inserts/updates in order to // account for bidi associations session.getActionQueue().prepareActions(); session.getActionQueue().executeActions(); } catch (HibernateException he) { LOG.error("Could not synchronize database state with session", he); throw he; } finally { session.getPersistenceContext().setFlushing(false); session.getJDBCContext().getConnectionManager().flushEnding(); } } }
persistenceContext.setFlushing(true); try { flushEntities(event); persistenceContext.setFlushing(false);
persistenceContext.setFlushing(true); try { flushEntities(event); persistenceContext.setFlushing(false);