Hi,
to answer my own question: The meta-model is re-created whenever
EntityManagerFactoryImpl is instantiated. Hence old meta-model
elements will be GC'ed and with them the SessionFactoryImpl etc. (if
it was closed).
In my case now there was a static reference from application code to
one element
I've added a new setting, AvailableSettings.USE_NEW_METADATA_MAPPINGS, that
tells BaseCoreFunctionalTestCase to build the SessionFactory from the new
metadata.
I've checked in a new test, org.hibernate.test.ops.SimpleOpsTest, that
configures this new setting and successfully saves, updates, get