I am trying to write simple service which will
1. Insert Record into MySQL Database. (mysqlTestDatasource)
2. Select records inserted into mysql database. (mysqlTestDatasource)
3. Insert records into oracle database which were selected from MySQL (oracleTestDatasource)
4. Update COPY_FLAG in mysql database. (mysqlTestDatasource)
I am throwing RuntimeException explicitly at Step#4. As per distributed transaction management Step#1 should also rollback and there should not be any data in Mysql database.
But it is getting committed. Please let me know what is wrong with attached source.
I am not clear about the transaction management concept with Spring too.