from Hibernate code:
Code:
if ( session.getFlushMode()!=FlushMode.NEVER) session.flush();
try {
session.connection().commit();
committed = true;
...
from Hibernate javadoc
Code:
public static final FlushMode NEVER
The Session is never flushed unless flush() is explicitly called by the application. This mode is very efficient for read only transactions.
...
Flushing is the process of synchronising the underlying persistent store with persistable state held in memory.
FlushMode.NEVER allows to implement "readonly transactions". Unless sesion.flush is called, no synchronization will be executed resulting in a potential gain of perfomance.