Java Code Examples for org.springframework.orm.hibernate3.HibernateTransactionManager#setSessionFactory()
The following examples show how to use
org.springframework.orm.hibernate3.HibernateTransactionManager#setSessionFactory() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PersistenceConfig.java From tutorials with MIT License | 5 votes |
@Bean @Autowired public HibernateTransactionManager transactionManager(final SessionFactory sessionFactory) { final HibernateTransactionManager txManager = new HibernateTransactionManager(); txManager.setSessionFactory(sessionFactory); return txManager; }
Example 2
Source File: PersistenceConfigHibernate3.java From tutorials with MIT License | 5 votes |
@Bean @Autowired public HibernateTransactionManager transactionManager(final SessionFactory sessionFactory) { final HibernateTransactionManager txManager = new HibernateTransactionManager(); txManager.setSessionFactory(sessionFactory); return txManager; }
Example 3
Source File: SpringConfig.java From quickperf with Apache License 2.0 | 4 votes |
@Bean public PlatformTransactionManager hibernateTransactionManager(LocalSessionFactoryBean sessionFactory) { HibernateTransactionManager transactionManager = new HibernateTransactionManager(); transactionManager.setSessionFactory(sessionFactory.getObject()); return transactionManager; }