Spring @Transactional with a transaction across multiple data sources

前端 未结 4 1425
终归单人心
终归单人心 2020-12-05 01:18

I have to update two data sources as part of one transaction. That is -

  1. I do an update in DB1.
  2. Then, I do another update in DB2.

If upd

4条回答
  •  一生所求
    2020-12-05 01:48

    Figured it out.

    The methods have to be in different beans to be able to use different transaction managers.

提交回复
热议问题