I have question on the order of committing in spring Transaction management. my current application requirement where i am using
and my transaction triggers from my MQ receive ...
Following is the order of action :
- MQ receives message
- DB insert in 3 tables - - procedure call
- DB insert in 3 tables - - procedure call
- DB insert in 3 tables - - procedure call
- MQ post message downstream queue
- MQ post message to 2nd down stream queue
I have tested all my rollback cases. a when step 6 fails it’s rolling back all the DB transaction including step 5 MQ rollback.
My question is once we post the message i would like to understand the commit order .. will it commit all the 3 DB transaction before the MQ commit to downstream queue ??
as I want to restrict the order of the transaction commit. it has to in order of 1,2,3,4,5 then 6
once we post the message , downstream application will be accessing the same tables which we are inserting on this transaction explained above.
can anyone guide me on this ?? how the commit of the transaction works ?