The Spring transaction management framework provides an
abstraction mechanism to the Java platform. His abstraction is capable of:
Working with local and global transactions (the local
transaction does not require an application server)
Working with nested transactions
Working with backup points
Working in almost all environments of the Java platform
By comparison, JTA supports only nested transactions and
global transactions, and requires an application server (and in some cases also
deploying applications to an application server)
.
The Spring Framework embeds a PlatformTransactionManager for
a number of transaction management strategies:
Transactions managed on a JDBC connection
Managed Transactions on Object-Relational Mapping Work Units
Transactions managed via JTA TransactionManager and
UserTransaction
Transactions managed on other resources, such as object
databases
Next to this abstraction mechanism, the framework also
provides two ways to add transaction management to applications:
Programmatically, using Spring TransactionTemplate
Configuratively, using metadata like XML or Java annotations
(@Transactional, etc.)
With the Spring data access framework - which integrates the
transaction management framework - it is possible to configure a transactional
system through configuration without having to rely on JTA or EJB. The
transactional framework also integrates with messaging and caching engines.
No comments:
Post a Comment