Revert "Implement SessionFactoryImplementor in SF proxies"

This reverts commit 08ccd19c76a71be3edf98f1a7f62cdd73ae98c9b.

Issue: SPR-8469
This commit is contained in:
Chris Beams
2011-10-09 07:55:21 +00:00
parent 363e08df22
commit b82d5ae8da
2 changed files with 7 additions and 13 deletions

View File

@@ -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());