I have a JTA transcation which I commit. Can I roll it back after I commit? If yes, how? I have following situation.
I have a backend layer which updated 3 DBs. I have used JTA user transcation for it. If update in any DB fails all updates to 3 DBs are rolled back using utx.rollback
Now I have a layer on top of backend layer which updates some other DB. Now I want that step 1 and step 2 should both succeed or both fail, so I want to roll back JTA transcation of step 1 in case step 2 fails.
It's difficult for me to put code of step 2 into 1 as we are using some existing APIs to update DB in step 2.