Revert "Auto-unwrap SessionFactoryBuilder-created proxies"

This reverts commit 7903d6489f9c98532826324b0ba79cafbc618d78.

Issue: SPR-8492
This commit is contained in:
Chris Beams
2011-10-09 07:55:14 +00:00
parent d122ecb42e
commit 363e08df22
2 changed files with 0 additions and 7 deletions

View File

@@ -52,7 +52,6 @@ import org.hibernate.transaction.JTATransactionFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.InfrastructureProxy;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.dao.DataAccessException;
@@ -567,7 +566,6 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
new Class<?>[] {
SessionFactory.class,
SessionFactoryImplementor.class,
InfrastructureProxy.class,
DisposableBean.class
},
new InvocationHandler() {
@@ -575,9 +573,6 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
if (ReflectionUtils.isToStringMethod(method)) {
return String.format("DisposableBean proxy for SessionFactory [%s]", rawSf.toString());
}
if (method.equals(InfrastructureProxy.class.getMethod("getWrappedObject"))) {
return rawSf;
}
if (method.equals(DisposableBean.class.getMethod("destroy"))) {
closeHibernateSessionFactory(SessionFactoryBuilderSupport.this, rawSf);
rawSf.close();