Reputation: 1571
We migrated from Spring 3.x to Spring 4.1.6. Spring 4 and above recommends Hibernate 4 or Hibernate 3.6.10. But we plan to continue using Hibernate 3.2.2 as there are several breaking changes b/w Hibernate 3.2.2 and 3.6.10 and we plan to address that later. So far we faced just one issue where Spring 4 was using some Exception classes that was missing in Hibernate 3.2.2. We were able to fix that easily.
Does anyone have any pointers to any other issues that we could face with this combination ? Or any pointers as to how to figure out specific features of Hibernate 3.6 that Spring 4 is using thats missing in hibernate 3.2.2 ?
Upvotes: 1
Views: 1470
Reputation: 23552
You may take a look at Spring's official migration guide:
The org.springframework.orm.hibernate3 package will be phasing out as of Spring Framework 4.2. We keep supporting it for the time being; however, we strongly recommend an upgrade to Hibernate 4.2/4.3 or 5.0.
As of Spring Framework 4.0.1, we provide a HibernateTemplate variant in org.springframework.orm.hibernate4 to ease migration for common Hibernate 3.x data access code, in particular if your motivation for an upgrade is the lack of bug fixes in the Hibernate 3.x line. Note that newly written code is recommended to use Hibernate's native SessionFactory.getCurrentSession() style.
On a related note, HibernateInterceptor is deprecated in org.springframework.orm.hibernate3 and doesn't exist anymore in org.springframework.orm.hibernate4. As a replacement for basic Session binding needs outside of transactions, consider the use of the new OpenSessionInterceptor variant, available for both Hibernate 3 and 4 as of Spring Framework 4.0.2.
Note: The Spring Framework 4.0.0 release accidentally restricted HibernateTemplate's List element types to Object only. This has been fixed as of 4.0.2 (https://jira.springsource.org/browse/SPR-11402), allowing for immediate casts to specifically typed Lists again. If you run into any issues migrating existing Hibernate access code, please upgrade to Spring Framework 4.0.2 first.
Upvotes: 2