SessionFactoryObserver could use a sessionFactoryAboutToClose method

Description

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).

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 AM
Edited

If it's possible, can this be added pre 6.0?

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 5, 2016 at 6:10 PM
Updated April 30, 2021 at 12:31 PM
Resolved May 6, 2016 at 6:04 PM