Spring's transaction support provides an abstraction over different transaction APIs, including the Java Transaction API (JTA) that works with global transactions, as well as the JDBC API, Hibernate transaction API, and JPA transaction API. The latter three APIs work with local transactions.
A global transaction can work with multiple transaction resources, typically relational database and message queues (JMS). And it is the application server that manages global transactions through JTA. On the other hand, a local transaction is resource-specific, for example, a transaction associated with a JDBC connection. Local transactions cannot work with multiple resources.
Spring transaction management supports both programmatic and declarative transaction management. You can use Spring's TransactionTemplate API to manage transactions programmatically...