I have two WARs running on the same tomcat server, both using Spring transactions and both writing to the same database. They communicate with each other through REST calls.
Now I have a business process that starts from foo.war, which calls bar.war, then returns back to foo.war. Both of them write to the same database, but they currently are not part of one transaction, so if foo.war fails to commit, bar.war doesn't rollback.
How can I solve this problem without integrating one war into the other?
I though a standalone JTA implementation might work, but since they are different applications, I'm not sure if it will.