简体   繁体   English

涉及春季和非春季的JTA交易

[英]JTA transactions involving spring and non-spring

By using an external jta manager like atomikos or bitronix, is it possible to combine a spring transaction and a non-spring transaction? 通过使用诸如atomikos或bitronix之类的外部jta管理器,是否可以合并春季交易和非春季交易? If possible, do I still need to annotate the method as transactional - what if the transactions span across methods or classes? 如果可能,我是否仍需要将方法注释为事务性的-如果事务跨越方法或类,该怎么办?

Then you should allow the other library use the same JTA library which you configured in Spring with either Bitronix or Atomikos. 然后,您应该允许其他库使用您在Spring中使用Bitronix或Atomikos配置的相同JTA库。

This way, you have aa JTA transcation manager configured in Spring and a single JTA DataSource which you need to pass to the outer library via the hibernate.connection.datasource configuration property. 这样,您就可以在Spring中配置一个JTA事务管理器,并通过hibernate.connection.datasource配置属性将其传递到外部库中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM