I have a Java Spring 3.0 application that inserts data in a database via myBatis 3.1 and also uses DataImportHandler (DIH) to have Solr 3.6.1 index that database data as well as index binary file attachments. So, I would like to have transaction that rollback changes if any of the following fail:
1) 3 inserts into the database using myBatis
2) solr DIH index of the 3 inserts
3) solr index of binary files
I'm guessing that I need to use JTA since I have multiple datasources but I do not know how to configure with Solr in the mix. How can this be done? Any online references that demonstrate how to accomplish this would also be great. Thanks.