Oct 1st, 2012, 10:36 AM
Using Hibernate and jdbcTemplate together
in the same application I have defined one datasource.
This datasource is using by hibernate (by org.springframework.orm.hibernate3.LocalSessionFac toryBean) and by jdbcTemplate (so without Hibernate). Can I do this? Can this give me problems?
For example: I have a transaction manager for hibernate (HibernateTransactionManager) and a transaction manager for jdbcTemplate (DataSourceTransactionManager) and if I use them for annotation I can't use both of them:
Oct 2nd, 2012, 12:27 AM
You don't need 2 transactionmanager you only need the HibernateTransactionManager...