Can I embed transactions from two different data s...
# komapper
d
Can I embed transactions from two different data sources so that anything in one that fails will rollback everything for both?
t
Komapper’s transaction feature does not support global transactions, but I think it can be achieved by integrating with the Java Transaction API (JTA).
d
I was actually thinking of trying to catch all exceptions and rethrowing them in both connection's transaction blocks, would that work?
t
In most cases it works well, but it will not work correctly in edge cases.
d
I guess it's better than nothing, unless you have some better solution... JTA isn't for r2dbc is it?
t
Indeed, JTA is not for R2DBC.