* avoiding object loading during a flush. Not needed during transactions.
*/
public void onFlush(FlushEvent event) {
if ( used ) {
Session session = event.getSession();
Synchronization synchronization = flushSynch.get( session );
if ( synchronization != null ) {
//first cleanup
flushSynch.remove( session );
log.debug( "flush event causing index update out of transaction" );
synchronization.beforeCompletion();
synchronization.afterCompletion( Status.STATUS_COMMITTED );
}
}
}