Transaction management framework

Spring's transaction management framework brings an abstraction mechanism to the Java platform. Its abstraction is capable of:
  • working with local and global transactions (local transaction does not require an application server)
  • working with nested transactions
  • working with savepoints
  • working in almost all environments of the Java platform
In comparison, JTA only supports nested transactions and global transactions, and requires an application server (and in some cases also deployment of applications in an application server).
The Spring Framework ships a PlatformTransactionManager for a number of transaction management strategies:
  • Transactions managed on a JDBC Connection
  • Transactions managed on Object-relational mapping Units of Work
  • Transactions managed via the JTA TransactionManager and UserTransaction
  • Transactions managed on other resources, like object databases
Next to this abstraction mechanism the framework also provides two ways of adding transaction management to applications:
  • Programmatically, by using Spring's TransactionTemplate
  • Configuratively, by using metadata like XML or Java annotations (@Transactional, etc)
Together with Spring's data access framework — which integrates the transaction management framework — it is possible to set up a transactional system through configuration without having to rely on JTA or EJB. The transactional framework also integrates with messaging and caching engines.

Comments

Popular posts from this blog

Convention-over-configuration rapid application development

Spring Framework

AOP framework