org.hibernate.integrator.spi.Integratoris intended to provide a simple means for allowing developers to hook into the process of building a functioning SessionFactory. The
org.hibernate.integrator.spi.Integratorinterface defines 2 methods of interest:
integrateallows us to hook into the building process;
disintegrateallows us to hook into a SessionFactory shutting down.
There is a 3rd method defined on
org.hibernate.integrator.spi.Integrator, an overloaded form of
org.hibernate.cfg.Configuration. This form is intended for use with the new metamodel code scheduled for completion in 5.0.
In addition to the discovery approach provided by the IntegratorService, applications can manually register Integrator implementations when building the BootstrapServiceRegistry.