session.setFlushMode( FlushMode.MANUAL );
session.setCacheMode( cacheMode );
session.setDefaultReadOnly( true );
try {
Transaction transaction = session.getTransaction();
transaction.begin();
loadAllFromQueue( session );
transaction.commit();
}
catch (Exception exception) {
errorHandler.handleException( log.massIndexerExceptionWhileTransformingIds(), exception );