SessionFactory lifecycle events.
A SessionFactoryObserver may be registered using the configuration property
hibernate.session_factory_observer.
org.hibernate.cfg.AvailableSettings#SESSION_FACTORY_OBSERVER , org.hibernate.boot.SessionFactoryBuilder#addSessionFactoryObservers(SessionFactoryObserver...)
| Modifier and Type | Method and Description |
|---|---|
| public default void | sessionFactoryClosed(SessionFactory
The factory closed. factory)Callback to indicate that the given factory has been closed. |
| public default void | sessionFactoryClosing(SessionFactory
The factory about to be closed. factory)Callback to indicate that the given factory is about to close. |
| public default void | sessionFactoryCreated(SessionFactory
The factory initialized. factory)Callback to indicate that the given factory has been created and is now ready for use. |
| sessionFactoryClosed | back to summary |
|---|---|
| public default void sessionFactoryClosed(SessionFactory factory) Callback to indicate that the given factory has been closed. Care should be taken in how (if at all) the passed factory reference is used since it is closed.
| |
| sessionFactoryClosing | back to summary |
|---|---|
| public default void sessionFactoryClosing(SessionFactory factory) Callback to indicate that the given factory is about to close. The passed factory reference should be usable since it is only about to close. API Note defined as default to allow for existing
| |
| sessionFactoryCreated | back to summary |
|---|---|
| public default void sessionFactoryCreated(SessionFactory factory) Callback to indicate that the given factory has been created and is now ready for use.
| |