Abstract {@link org.springframework.beans.factory.FactoryBean} that createsa Hibernate {@link org.hibernate.SessionFactory} within a Spring applicationcontext, providing general infrastructure not related to Hibernate's specific configuration API.
This class implements the {@link org.springframework.dao.support.PersistenceExceptionTranslator}interface, as autodetected by Spring's {@link org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor}, for AOP-based translation of native exceptions to Spring DataAccessExceptions. Hence, the presence of e.g. LocalSessionFactoryBean automatically enables a PersistenceExceptionTranslationPostProcessor to translate Hibernate exceptions.
This class mainly serves as common base class for {@link LocalSessionFactoryBean}. For details on typical SessionFactory setup, see the LocalSessionFactoryBean javadoc.
@author Juergen Hoeller
@since 2.0
@see #setExposeTransactionAwareSessionFactory
@see org.hibernate.SessionFactory#getCurrentSession()
@see org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor