scalar-labs / btm

JTA Transaction Manager
Apache License 2.0
426 stars 151 forks source link

Issues related to spring cloud + feign #98

Closed ice-ice closed 6 years ago

ice-ice commented 6 years ago

call chain :

serverA -> serverB

serverA method describtion:

Execute the local transaction first.(insert data into db.) and use feign to call remote serverB. next , throw RunTimeException();

serverB method describtion: Only Execute the local transaction. insert data into db.

now.......

serverB is Insert the success . serverA is insert failure...because serverA throw RunTimeException;


so ............

serverB Should be rolled back !!!!

but serverB insert success ??????? WHY ????

ice-ice commented 6 years ago

pay special attention to serverA 。

call serverB ,first.. next , throw RunTimeException()

Notice the order of execution ..........

plz tell me why ................. What should I do

ice-ice commented 6 years ago

serverA :

serverB:

lorban commented 6 years ago

BTM does not implement anything that would make transactions propagate across servers. I don't think there's ever been a protocol to do that over REST (like WS-AT does for SOAP).

In short: this isn't supported and cannot work.