open fun buildSessionFactory(bootstrapExecutor: AsyncTaskExecutor): SessionFactory
Build the Hibernate SessionFactory through background bootstrapping, using the given executor for a parallel initialization phase (e.g. a org.springframework.core.task.SimpleAsyncTaskExecutor).
SessionFactory initialization will then switch into background bootstrap mode, with a SessionFactory proxy immediately returned for injection purposes instead of waiting for Hibernate's bootstrapping to complete. However, note that the first actual call to a SessionFactory method will then block until Hibernate's bootstrapping completed, if not ready by then. For maximum benefit, make sure to avoid early SessionFactory calls in init methods of related beans, even for metadata introspection purposes.
Since
4.3
See Also
#buildSessionFactory()