I had found 3 approaches for Spring and Hibernate integration by using HibernateTemplate or a HibernateDaoSupport or by DAO with the Dependency Injection pattern.
I could not grab the best approach among these . COuld you please tell me what approach to follow .
Let me answer my question :
Hibernate API
Advantage is we are comfortable with Hibernate and directly use Hibernate .
The disadvantage of use the Hibernate API is that you don't get the benefits of Spring's DataAccessException translation. Which, depending on your shop, you might care about this.
Generally speaking, if you're committed to using Hibernate, this is not a bad choice.
HibernateTemplate
This is the first level of Spring's coding support for Hibernate. It eliminates the need for doing anything with the Hibernate Session, at all. It looks for a current Hibernate Session for you; if one exists, it executes the requested operation on that session. This is great for turning your simpler Hibernate code into one-liners.
Also, Hibernate Exceptions are automatically converted to Spring's DataAccessException hierarchy.
HibernateDaoSupport
This is the second level of boilerplate removal Spring addresses with respect to Hibernate. This is a base class from which your DAOs extend. HibernateDaoSupport wraps a HibernateTemplate and includes the corresponding getter/setter definitions you would normally have to duplicate across your DAOs.