Spring provides integration with Hibernate 3 and 4 under the form of HibernateTemplate
, and the one you show provides integration with Hibernate 3.
The main goal of this class was to provide a Hibernate session via a callback, and another important functionality was to translate Hibernate exceptions to Spring exceptions.
The use of this class is not recommended anymore, have a look at this answer. The recommended way is to use the @Transactional
annotation.