Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 6. Managing transactions > Choosing a transaction manager

6.2. Choosing a transaction manager

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.

Table 6.1. Spring has transaction managers for every occasion.
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.JdoTransactionManagerUsing JDO for persistence.
orm.jpa.JpaTransactionManagerUsing 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.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint