Before we get to the configuration files, we should first review the Spring transaction management concepts. The two main reasons we want to use Spring's transaction support are first for consistent programming model for different transactional APIs and secondly, the availability of declarative transaction management.
The consistent transactional API is most evident when an application uses different data sources. Out of the box Spring lets our applications use the transactional capabilities of Hibernate, JPA, JTA, JDBC, and more using the same programming model. All of these transactional APIs are hidden behind one Spring abstraction, the transaction strategy.
The transaction strategy is an example of a strategy pattern. The strategy pattern is a way of abstracting some algorithm behind a common interface. This creates a pluggable software system where the appropriate algorithm is plugged in at the appropriate time. In this case, the "appropriate algorithm" is transactional...