diff --git a/hibernate-core/src/main/java/org/hibernate/engine/query/spi/NativeQueryInterpreterInitiator.java b/hibernate-core/src/main/java/org/hibernate/engine/query/spi/NativeQueryInterpreterInitiator.java index e0e043ad87..da55dcb430 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/query/spi/NativeQueryInterpreterInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/query/spi/NativeQueryInterpreterInitiator.java @@ -6,10 +6,7 @@ */ package org.hibernate.engine.query.spi; -import org.hibernate.boot.spi.SessionFactoryOptions; import org.hibernate.engine.query.internal.NativeQueryInterpreterStandardImpl; -import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.service.spi.ServiceRegistryImplementor; import org.hibernate.service.spi.SessionFactoryServiceInitiator; import org.hibernate.service.spi.SessionFactoryServiceInitiatorContext; @@ -22,14 +19,6 @@ public class NativeQueryInterpreterInitiator implements SessionFactoryServiceIni */ public static final NativeQueryInterpreterInitiator INSTANCE = new NativeQueryInterpreterInitiator(); - @Override - public NativeQueryInterpreter initiateService( - SessionFactoryImplementor sessionFactory, - SessionFactoryOptions sessionFactoryOptions, - ServiceRegistryImplementor registry) { - return new NativeQueryInterpreterStandardImpl(); - } - @Override public NativeQueryInterpreter initiateService(SessionFactoryServiceInitiatorContext context) { return new NativeQueryInterpreterStandardImpl(); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/CacheInitiator.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/CacheInitiator.java index 5f9c563365..1634a4d7fe 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/CacheInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/CacheInitiator.java @@ -6,14 +6,13 @@ */ package org.hibernate.engine.spi; -import org.hibernate.boot.spi.SessionFactoryOptions; import org.hibernate.cache.internal.DisabledCaching; import org.hibernate.cache.internal.EnabledCaching; import org.hibernate.cache.internal.NoCachingRegionFactory; import org.hibernate.cache.spi.CacheImplementor; import org.hibernate.cache.spi.RegionFactory; -import org.hibernate.service.spi.ServiceRegistryImplementor; import org.hibernate.service.spi.SessionFactoryServiceInitiator; +import org.hibernate.service.spi.SessionFactoryServiceInitiatorContext; /** * Initiator for second level cache support @@ -25,14 +24,11 @@ public class CacheInitiator implements SessionFactoryServiceInitiator extends Servi * * @return The initiated service. */ - default R initiateService(SessionFactoryServiceInitiatorContext context) { - return initiateService( - context.getSessionFactory(), - context.getSessionFactoryOptions(), - context.getServiceRegistry() - ); - } - - /** - * Initiates the managed service. - *

- * Note for implementors: signature is guaranteed to change once redesign of SessionFactory building is complete - * - * @param sessionFactory The session factory. Note the session factory is still in flux; care needs to be taken - * regarding what you call. - * @param sessionFactoryOptions Options specified for building the SessionFactory - * @param registry The service registry. Can be used to locate services needed to fulfill initiation. - * - * @return The initiated service. - * - * @deprecated Use {@link SessionFactoryServiceInitiator#initiateService(SessionFactoryServiceInitiatorContext)} instead. - */ - @Deprecated - R initiateService( - SessionFactoryImplementor sessionFactory, - SessionFactoryOptions sessionFactoryOptions, - ServiceRegistryImplementor registry); + R initiateService(SessionFactoryServiceInitiatorContext context); } diff --git a/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java b/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java index 13ad9f106d..e3cffd2701 100644 --- a/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java @@ -8,7 +8,6 @@ package org.hibernate.stat.internal; import org.hibernate.HibernateException; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; -import org.hibernate.boot.spi.SessionFactoryOptions; import org.hibernate.engine.config.spi.ConfigurationService; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.CoreMessageLogger; @@ -48,18 +47,6 @@ public class StatisticsInitiator implements SessionFactoryServiceInitiator