Spring has several built-in implementations of PlatformTransactionManager interface for use with different transaction management APIs.

Giang Phạm

New member
Spring has several built-in implementations of PlatformTransactionManager interface for use with different transaction management APIs.
A. True
B. False
 
Answer: a
Explanation:
• If you have to deal with only a single data source in your application and access it
with JDBC, DataSourceTransactionManager should meet your needs.
• If you are using JTA for transaction management on a Java EE application server,
you should use JtaTransactionManager to look up a transaction from the
application server. Additionally, JtaTransactionManager is appropriate for
distributed transactions (transactions that span multiple resources). Note that
while it’s common to use a JTA transaction manager to integrate the application
servers’ transaction manager, there’s nothing stopping you from using a stand-
alone JTA transaction manager such as Atomikos.
• If you are using an object/relational mapping framework to access a database, you
should choose a corresponding transaction manager for this framework, such as
HibernateTransactionManager and JpaTransactionManager.
 

Tìm kiếm

Back
Top