diff --git a/org.springframework.integration-tests/src/test/java/org/springframework/orm/hibernate3/HibernateSessionFactoryConfigurationTests.java b/org.springframework.integration-tests/src/test/java/org/springframework/orm/hibernate3/HibernateSessionFactoryConfigurationTests.java index 3f9df777ad..66344b54be 100644 --- a/org.springframework.integration-tests/src/test/java/org/springframework/orm/hibernate3/HibernateSessionFactoryConfigurationTests.java +++ b/org.springframework.integration-tests/src/test/java/org/springframework/orm/hibernate3/HibernateSessionFactoryConfigurationTests.java @@ -33,7 +33,6 @@ import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.classic.Session; -import org.hibernate.engine.SessionFactoryImplementor; import org.junit.Ignore; import org.junit.Test; import org.springframework.beans.factory.BeanCreationException; @@ -132,11 +131,10 @@ public class HibernateSessionFactoryConfigurationTests { } @Test - public void builtSessionFactoryIsProxyImplementingDisposableBeanAndSessionFactoryImplementor() { + public void builtSessionFactoryIsDisposableBeanProxy() { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(AnnotationSessionFactoryConfig.class); SessionFactory sessionFactory = ctx.getBean(SessionFactory.class); assertThat(sessionFactory, instanceOf(DisposableBean.class)); - assertThat(sessionFactory, instanceOf(SessionFactoryImplementor.class)); assertThat(sessionFactory.toString(), startsWith("DisposableBean proxy for SessionFactory")); ctx.close(); assertTrue("SessionFactory was not closed as expected", sessionFactory.isClosed()); diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java index 140f9bd8ce..cdf1b160b3 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java @@ -232,9 +232,8 @@ public abstract class SessionFactoryBuilderSupportSubclasses may override this to implement transaction awareness through * a {@code SessionFactory} proxy for example, or even to avoid creation of the * {@code DisposableBean} proxy altogether. - * @param rawSf the raw {@code SessionFactory} as built by {@link #doBuildSessionFactory()} - * @return a proxied {@code SessionFactory} if wrapping was necessary, otherwise the - * original given 'raw' {@code SessionFactory} object. + * @param rawSf the raw {@code SessionFactory} as built by {@link #buildSessionFactory()} + * @return the {@code SessionFactory} reference to expose * @see #buildSessionFactory() */ protected SessionFactory wrapSessionFactoryIfNecessary(final SessionFactory rawSf) { @@ -565,7 +562,6 @@ public abstract class SessionFactoryBuilderSupport[] { SessionFactory.class, - SessionFactoryImplementor.class, DisposableBean.class }, new InvocationHandler() {