From c013ae12b75ee9d05da3230725d89b8ff3f98a9c Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Wed, 27 May 2020 18:22:54 +0100 Subject: [PATCH] HHH-14047 Expose some methods of EntityManagerFactoryBuilderImpl to extensions --- .../internal/EntityManagerFactoryBuilderImpl.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java b/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java index 149300f1c4..afc4ffb3ea 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java @@ -1216,7 +1216,10 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil // todo : close the bootstrap registry (not critical, but nice to do) } - private MetadataImplementor metadata() { + /** + * Used by extensions : Hibernate Reactive + */ + protected MetadataImplementor metadata() { if ( this.metadata == null ) { this.metadata = MetadataBuildingProcess.complete( managedResources, @@ -1328,7 +1331,7 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil return persistenceException( message, null ); } - private PersistenceException persistenceException(String message, Exception cause) { + protected PersistenceException persistenceException(String message, Exception cause) { return new PersistenceException( getExceptionHeader() + message, cause @@ -1448,4 +1451,12 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil return instance; } + + /** + * Exposed to extensions: see Hibernate Reactive + * @return + */ + protected StandardServiceRegistry getStandardServiceRegistry() { + return standardServiceRegistry; + } }