Sr.Java Web Developer Question:

Explain me how to integrate Spring and Hibernate Frameworks?

Tweet Share WhatsApp

Answer:

We can use Spring ORM module to integrate Spring and Hibernate frameworks, if you are using Hibernate 3+ where SessionFactory provides current session, then you should avoid using HibernateTemplate or HibernateDaoSupport classes and better to use DAO pattern with dependency injection for the integration.

Also Spring ORM provides support for using Spring declarative transaction management, so you should utilize that rather than going for hibernate boiler-plate code for transaction management.

Download Sr.Java Web Developer PDF Read All 64 Sr.Java Web Developer Questions
Previous QuestionNext Question
Explain me what are the differences between Checked Exception and Unchecked Exception?Can you name the different modules of the Spring framework?