diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java index 1f52c6b7fdb..89876c1ffa7 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java @@ -42,7 +42,7 @@ public class LocalRegionFactoryProxy implements RegionFactory { public LocalRegionFactoryProxy() { - RegionFactory rf = LocalSessionFactoryBean.getConfigTimeRegionFactory(); + RegionFactory rf = (RegionFactory) LocalSessionFactoryBean.getConfigTimeRegionFactory(); // absolutely needs thread-bound RegionFactory to initialize if (rf == null) { throw new IllegalStateException("No Hibernate RegionFactory found - " + diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java index 19fb9a08b40..23ca09e5254 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java @@ -34,7 +34,6 @@ import org.hibernate.Interceptor; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cache.CacheProvider; -import org.hibernate.cache.RegionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Environment; import org.hibernate.cfg.NamingStrategy; @@ -90,13 +89,11 @@ import org.springframework.util.StringUtils; * {@link org.springframework.orm.hibernate3.support.OpenSessionInViewFilter} / * {@link org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor}. * - *
Requires Hibernate 3.3 or later. Note that this factory will use - * "on_close" as default Hibernate connection release mode, unless in the - * case of a "jtaTransactionManager" specified, for the reason that - * this is appropriate for most Spring-based applications (in particular when - * using Spring's HibernateTransactionManager). Hibernate 3.0 used "on_close" - * as its own default too; however, Hibernate 3.1 changed this to "auto" - * (i.e. "after_statement" or "after_transaction"). + *
Requires Hibernate 3.2 or later, with Hibernate 3.3 being recommended.
+ * Note that this factory will use "on_close" as default Hibernate connection
+ * release mode, unless in the case of a "jtaTransactionManager" specified,
+ * for the reason that this is appropriate for most Spring-based applications
+ * (in particular when using Spring's HibernateTransactionManager).
*
* @author Juergen Hoeller
* @since 1.2
@@ -115,8 +112,8 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
private static final ThreadLocal