Transaction management for multiple database Using Spring & Hibernate

后端 未结 3 1963
轻奢々
轻奢々 2020-12-16 05:57

Am coming up with a Spring & Hibernate application which has Inserts/Update to its own system database and it even has to Insert/update other systems with different data

3条回答
  •  旧巷少年郎
    2020-12-16 06:28

    Assuming you are looking for transactions involving multiple datasources, I highly recommend you give this series of posts by David Syer (spring lead) on your options:

    http://www.javaworld.com/article/2077963/open-source-tools/distributed-transactions-in-spring--with-and-without-xa.html

    For example, some databases even support transactions across databases schemas under certain circumstances without distributed transactions (see here).

    There are other options other than XA 2-phase commit transaction managers (as they introduce significant overhead and complexity) but they involve different trade-offs.

提交回复
热议问题