I am working on a project in which we have two Database one is Microsoft SQL server and other is DB2. I have to insert many sets of data in both the table, if any of the set of SQL query fails then it will rollback in both the database, How to do transaction management in spring with JDBCTemplate.