13.10.1Use of the wrong transaction manager for a specific DataSource
Use thecorrectPlatformTransactionManager
implementation based on your choice of transactional technologies and requirements. Used properly, the Spring Framework merely provides a straightforward and portable abstraction. If you are using global transactions, you_must_use theorg.springframework.transaction.jta.JtaTransactionManager
class (or anapplication server-specific subclassof it) for all your transactional operations. Otherwise the transaction infrastructure attempts to perform local transactions on resources such as containerDataSource
instances. Such local transactions do not make sense, and a good application server treats them as errors.