Search in sources :

Example 1 with HibernateTransactionManager

use of org.springframework.orm.hibernate3.HibernateTransactionManager in project rhino by PLOS.

the class TestConfiguration method transactionManager.

@Bean
public HibernateTransactionManager transactionManager(SessionFactory sessionFactory) {
    HibernateTransactionManager manager = new HibernateTransactionManager();
    manager.setSessionFactory(sessionFactory);
    return manager;
}
Also used : HibernateTransactionManager(org.springframework.orm.hibernate3.HibernateTransactionManager) LocalSessionFactoryBean(org.springframework.orm.hibernate3.LocalSessionFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with HibernateTransactionManager

use of org.springframework.orm.hibernate3.HibernateTransactionManager in project rhino by PLOS.

the class RhinoConfiguration method transactionManager.

@Bean
// and a JmsTransactionManager.
@Primary
public HibernateTransactionManager transactionManager(SessionFactory sessionFactory) {
    HibernateTransactionManager manager = new HibernateTransactionManager();
    manager.setSessionFactory(sessionFactory);
    return manager;
}
Also used : HibernateTransactionManager(org.springframework.orm.hibernate3.HibernateTransactionManager) Primary(org.springframework.context.annotation.Primary) AnnotationSessionFactoryBean(org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

Bean (org.springframework.context.annotation.Bean)2 HibernateTransactionManager (org.springframework.orm.hibernate3.HibernateTransactionManager)2 Primary (org.springframework.context.annotation.Primary)1 LocalSessionFactoryBean (org.springframework.orm.hibernate3.LocalSessionFactoryBean)1 AnnotationSessionFactoryBean (org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean)1