The root cause is in SessionImpl's constructor, the following code snippet is lacking:
public SessionImpl(SessionFactoryImpl factory, SessionCreationOptions options) { ... ... setDefaultProperties(); applyProperties(); ... ... } private void applyProperties() { applyEntityManagerSpecificProperties(); setHibernateFlushMode( ConfigurationHelper.getFlushMode( properties.get( AvailableSettings.FLUSH_MODE ), FlushMode.AUTO ) ); setLockOptions( this.properties, this.lockOptions ); getSession().setCacheMode( CacheModeHelper.interpretCacheMode( currentCacheStoreMode(), currentCacheRetrieveMode() ) ); }
I reverted back the line setting flush code (i.e. Line #10 above) and found it fixed the issue.