Originally posted by Keerthi P:
My understanding is that Scenario-2 will create nested transaction and the spec does not allow it.
I am not sure about my answer, but I'll give it a go:
1) The domain for a transaction is a method, therefore unless in the same method you have more that one ut.begin() we cannot speak nested transactions;
2) Because BMT don't accept to run their transaction as part of other callers' transaction context, the normal behaviour will be:
a) methodB will suspend temporarly methodA's transaction
b) methodB will execute its business in its own transaction
c) methodA will continue from where it was suspended
Because methodB has suspended methodA tx, anything happened in methodB tx didn't have any effects on methodA tx, therefore even if methodB rolls-back, methodA will still be free to resume normally.