The ProviderUtil#isLoadedWithoutReference/ProviderUtil#isLoadedWithReference cases are interesting. I created a new issue doing some work there: HHH-8735
The underlying problem, as Scott pointed out, is the non-contextual nature of Persistence#isLoaded forcing it to ask isLoadedWithoutReference/isLoadedWithReference of every known JPA provider. The solution is likely to simply log this deprecation warning just on:
-
createEntityManagerFactory
-
createContainerEntityManagerFactory
-
generateSchema
(as well as on getEntityManagerFactoryBuilderOrNull)
Let's discuss (if need be) on HHH-8735
|