SessionFactoryObserver could use a sessionFactoryAboutToClose method
Description
is followed up by
Activity
Show:
Steve Ebersole May 5, 2016 at 4:15 PM
It is slated for 5.2

Martin Braun April 6, 2016 at 7:19 AMEdited
If it's possible, can this be added pre 6.0?
Currently the SessionFactory allows to listen for events about its creation and it being closed. The latter however only notifies the listener after it has already been closed.
For my use case I need a callback that is called before any actual resources are closed so I can cleanup objects that I want to bind to the lifecycle of the SessionFactory (and these require access to the database).