Package org.hibernate
Interface SessionFactoryObserver
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
TypeConfiguration
public interface SessionFactoryObserver extends java.io.Serializable
Allows reaction to basicSessionFactory
occurrences.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
sessionFactoryClosed(SessionFactory factory)
Callback to indicate that the given factory has been closed.default void
sessionFactoryClosing(SessionFactory factory)
Callback to indicate that the given factory is about close.default void
sessionFactoryCreated(SessionFactory factory)
Callback to indicate that the given factory has been created and is now ready for use.
-
-
-
Method Detail
-
sessionFactoryCreated
default void sessionFactoryCreated(SessionFactory factory)
Callback to indicate that the given factory has been created and is now ready for use.- Parameters:
factory
- The factory initialized.
-
sessionFactoryClosing
default void sessionFactoryClosing(SessionFactory factory)
Callback to indicate that the given factory is about close. The passed factory reference should be usable since it is only about to close. NOTE : defined as default to allow for existing SessionFactoryObserver impls to work in 5.2. Starting in 6.0 the default will be removed and SessionFactoryObserver impls will be required to implement this new method.- Parameters:
factory
- The factory about to be closed.- Since:
- 5.2
-
sessionFactoryClosed
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.- Parameters:
factory
- The factory closed.
-
-