8

I have two transactional methods A and B. A has isolation level of READ_COMMITTED and B has isolation level of SERIALIZABLE. if B was called inside A, what would be the default behavior here?

  • is spring going to create a new transaction for B or it will be run in the same transaction? would the isolation level of B be handled correctly?
  • in case of two threads are accessing A at the same time, what would happen when they reach B call?
  • In case of B's transaction was rolled back for some reason, would A's transaction be rolled back as well?

Note: let us assume that propagation level is the default one for both A and B.

Any ideas about what happens in such a situation?

Yahya
  • 321
  • 3
  • 3
  • Note-2: just for clarification, the project is based on Spring framework – Yahya Feb 05 '16 at 00:26
  • There is only one transaction so your 3 bullet doesn't go (as it is an all or nothing operation). There is already a transaction and B will just participate in that transaction. – M. Deinum Feb 05 '16 at 07:00

0 Answers0