Spring notes(五) - transaction
Spring transaction mechanism supports:
programming transaction
declaring transaction
I. Programming transaction:
At first, you should define a transactionManager which is the subclass derived from PlatformTransactionManager.
DataSourceTransactionManager: inject datasource instance to it.
JtaTransactionManager: no need to inject anything
HibernateTransactionManager: inject sessionFactory instance to it
JdoTransactionManager: inject persistenceManagerFactory instance to it
Then, inject these transactionManagers to JdbcTemplate, HibernateTemplate, JdoTemplate, sqlMapDaoTemplate respectively. All these templates encapsulate transaction [...]
By javafuns on March 18, 2008 at 22:54 ·
Views: 599 · Permalink
· Leave a comment
Categorized in: Java · Tagged with: Java, Spring, Transaction
Categorized in: Java · Tagged with: Java, Spring, Transaction

(
(4.00 out of 5)