Package org.hibernate.integrator.spi
Interface Integrator
-
- All Known Implementing Classes:
BeanValidationIntegrator
,CollectionCacheInvalidator
,EnversIntegrator
,SharedDriverManagerTypeCacheClearingIntegrator
@JavaServiceLoadable public interface Integrator
Contract for extensions that integrate with Hibernate.The best way to make an implementation of
Integrator
available to Hibernate is by making it discoverable via the standard JavaServiceLoader
facility.- Since:
- 4.0
- Implementation Note:
integrate(Metadata, BootstrapContext, SessionFactoryImplementor)
is called during the process of session factory initialization. In fact, it's called directly from the constructor ofSessionFactoryImpl
. So the passed session factory is not yet fully-initialized and is in a very fragile state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
Tongue-in-cheek name for a shutdown callback.default void
integrate(Metadata metadata, BootstrapContext bootstrapContext, SessionFactoryImplementor sessionFactory)
Perform integration.default void
integrate(Metadata metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
Deprecated.- use
-
-
-
Method Detail
-
integrate
@Deprecated(since="6.0") default void integrate(Metadata metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
Deprecated.- usePerform integration.- Parameters:
metadata
- The "compiled" representation of the mapping informationsessionFactory
- The session factory being createdserviceRegistry
- The session factory's service registry
-
integrate
@Incubating default void integrate(Metadata metadata, BootstrapContext bootstrapContext, SessionFactoryImplementor sessionFactory)
Perform integration.- Parameters:
metadata
- The fully initialized boot-time mapping modelbootstrapContext
- The context for bootstrapping of the SessionFactorysessionFactory
- The SessionFactory being created
-
disintegrate
void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
Tongue-in-cheek name for a shutdown callback.- Parameters:
sessionFactory
- The session factory being closed.serviceRegistry
- That session factory's service registry
-
-