diff --git a/hibernate-core/src/main/java/org/hibernate/boot/spi/AbstractDelegatingSessionFactoryBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/spi/AbstractDelegatingSessionFactoryBuilder.java index 4b662a5877..2a90b1ee45 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/spi/AbstractDelegatingSessionFactoryBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/spi/AbstractDelegatingSessionFactoryBuilder.java @@ -15,6 +15,7 @@ import org.hibernate.EntityNameResolver; import org.hibernate.Interceptor; import org.hibernate.MultiTenancyStrategy; import org.hibernate.NullPrecedence; +import org.hibernate.SessionFactory; import org.hibernate.SessionFactoryObserver; import org.hibernate.boot.SessionFactoryBuilder; import org.hibernate.boot.TempTableDdlTransactionHandling; @@ -24,6 +25,7 @@ import org.hibernate.dialect.function.SQLFunction; import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy; import org.hibernate.loader.BatchFetchStyle; import org.hibernate.proxy.EntityNotFoundDelegate; +import org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode; import org.hibernate.resource.jdbc.spi.StatementInspector; import org.hibernate.tuple.entity.EntityTuplizer; import org.hibernate.tuple.entity.EntityTuplizerFactory; @@ -33,6 +35,7 @@ import org.hibernate.tuple.entity.EntityTuplizerFactory; * * @author Steve Ebersole * @author Gunnar Morling + * @author Guillaume Smet * @param The type of a specific sub-class; Allows sub-classes to narrow down the return-type of the contract methods * to a specialization of {@link SessionFactoryBuilder} */ @@ -50,6 +53,10 @@ public abstract class AbstractDelegatingSessionFactoryBuilder S unwrap(Class type) { return (S) this; } + + @Override + public T applyStatelessInterceptor(Class statelessInterceptorClass) { + delegate.applyStatelessInterceptor( statelessInterceptorClass ); + return getThis(); + } + + @Override + public T applyConnectionHandlingMode(PhysicalConnectionHandlingMode connectionHandlingMode) { + delegate.applyConnectionHandlingMode( connectionHandlingMode ); + return getThis(); + } + + @Override + public SessionFactory build() { + return delegate.build(); + } }