Two phase commit for distributed transactions in Java

preview_player
Показать описание
This is a demonstration of the two-phase commit concept.
Рекомендации по теме
Комментарии
Автор

Dude this is not the 2pc, the commit may still fail for whatever reason, you still need to lock the resource somehow even after the commit to handle this condition.

hopegolestany
Автор

Let's say the first statement works fine and your TwoPhaseCommitService committed the first transaction but the second one failed. How are you gonna rollback the first commit? It will cause an inconsistent state.

firatkucuk
join shbcf.ru