Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Spring doesn’t directly manage transactions. Instead, it comes with a selection of transaction managers that delegate responsibility for transaction management to a platform-specific transaction implementation provided by either JTA or the persistence mechanism. Spring’s transaction managers are listed in table 6.1.
| Transaction manager (org.springframework.*) | Use it when... |
|---|---|
| jca.cci.connection. CciLocalTransactionManager | Using Spring’s support for Java EE Connector Architecture (JCA) and the Common Client Interface (CCI). |
| jdbc.datasource. DataSourceTransactionManager | Working with Spring’s JDBC abstraction support. Also useful when using iBATIS for persistence. |
| jms.connection. JmsTransactionManager | Using JMS 1.1+. |
| jms.connection. JmsTransactionManager102 | Using JMS 1.0.2. |
| orm.hibernate3. HibernateTransactionManager | Using Hibernate 3 for persistence. |
| orm.jdo.JdoTransactionManager | Using JDO for persistence. |
| orm.jpa.JpaTransactionManager | Using the Java Persistence API (JPA) for persistence. |
| transaction.jta. JtaTransactionManager | You need distributed transactions or when no other transaction manager fits the need. |
| transaction.jta. OC4JJtaTransactionManager | Using Oracle’s OC4J JEE container. |
| transaction.jta. WebLogicJtaTransactionManager | You need distributed transactions and your application is running within WebLogic. |
| transaction.jta. WebSphereUowTransactionManager | You need transactions managed by a UOWManager in WebSphere. |