Spring multiple transaction managers, single transaction

前端 未结 3 482
抹茶落季
抹茶落季 2020-12-30 12:34

I have a complex situation where I have to use 2 different databases, there for I use 2 different transaction managers. Is there a way in Spring to link these transaction ma

3条回答
  •  [愿得一人]
    2020-12-30 13:04

    You need a global transaction manager which supports 2-phase-commit (XA). Several independent and free ones are available. I've used Bitronix in a Spring-based project, but there is also Atomikos, and probably others. See http://en.wikipedia.org/wiki/Java_Transaction_API#Opensource_JTA_implementations

提交回复
热议问题