Java Atomikos vs JOTM vs Bitronix vs?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2978207/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 15:10:17  来源:igfitidea点击:

Atomikos vs JOTM vs Bitronix vs?

javatransactionsjakarta-eejta

提问by HDave

I am new to JTA and it's underlying transaction managers. Can anyone explain the pros/cons of each of these? Feel free to add others I didn't list in title.

我是 JTA 的新手,它是底层事务管理器。任何人都可以解释每个的优点/缺点吗?随意添加我没有在标题中列出的其他人。

Also, don't the major applications servers (WebSphere, JBoss, Glassfish) have their own JTA compliant transaction manager? In those environments, would you still use these third party implementations?

此外,主要的应用程序服务器(WebSphere、JBoss、Glassfish)没有自己的 JTA 兼容事务管理器吗?在这些环境中,您还会使用这些第三方实现吗?

采纳答案by Pascal Thivent

I am new to JTA and it's underlying transaction managers. Can anyone explain the pros/cons of each of these? Feel free to add others I didn't list in title.

我是 JTA 的新手,它是底层事务管理器。任何人都可以解释每个的优点/缺点吗?随意添加我没有在标题中列出的其他人。

Standalone transaction managers I'm aware of include Bitronix, SimpleJTA, Tyrex(dead?), JOTM(used in Jonas), GeronimoTM/Jencks(used in Geronimo), JBossTS(used in JBoss) and Atomikos.

我知道的独立事务管理器包括BitronixSimpleJTATyrex(死了?)、JOTM(在 Jonas 中使用)、GeronimoTM/Jencks(在 Geronimo 中使用)、JBossTS(在 JBoss 中使用)和Atomikos

I've never tested them all extensively (and this is what you would have to do if you have to choose one) so I can't provide an exhaustive pros/cons (and that would require some work). But here are some links:

我从来没有对它们进行过广泛的测试(如果你必须选择一个,这就是你必须做的)所以我不能提供详尽的优点/缺点(这需要一些工作)。但这里有一些链接:

Just in case, here is my very personal point of view:

以防万一,这是我非常个人的观点:

  • I've seen lots of complains about JOTM.
  • I think that GeronimoTM/Jencks lacks of documentation.
  • SimpleJTA doesn't implement JTS and is not active.
  • Bitronix is decently documentation but doesn't offer support.
  • Atomikos is an impressive product, well documented and does offer support.
  • JBossTS aka ArjunaTS is definitely a mature product (see the announcement of the acquisitionfor some history) and does offer support.
  • 我见过很多关于 JOTM 的抱怨。
  • 我认为 GeronimoTM/Jencks 缺乏文档。
  • SimpleJTA 不实现 JTS 并且不活跃。
  • Bitronix 是体面的文档,但不提供支持。
  • Atomikos 是一款令人印象深刻的产品,有据可查,并提供支持。
  • JBossTS 又名 ArjunaTS 绝对是一个成熟的产品(请参阅收购公告以了解一些历史)并且确实提供支持。

Personally, I'd shortlist Atomikos and JBossTS and test them hardcore if I had to choose one.

就个人而言,如果我必须选择一个,我会将 Atomikos 和 JBossTS 列入候选名单并测试它们的核心。

Also, don't the major applications servers (WebSphere, JBoss, Glassfish) have their own JTA compliant transaction manager?

此外,主要的应用程序服务器(WebSphere、JBoss、Glassfish)没有自己的 JTA 兼容事务管理器吗?

Of course they do, JTA is part of the Java EE specification, a Java EE server has to support it.

当然可以,JTA 是 Java EE 规范的一部分,Java EE 服务器必须支持它。

In those environments, would you still use these third party implementations?

在这些环境中,您还会使用这些第三方实现吗?

No, I'd use the provided transaction manager (for simplicity, support, etc).

不,我会使用提供的事务管理器(为了简单、支持等)。

回答by Pawel Sidoryk

I have tested Atomikos and JOTM with Jetty. Atomikos worked fine and I fully recommend it. I made e.g. automated unit tests for testing distributed transactions in my application and these tests worked fine.

我已经用 Jetty 测试了 Atomikos 和 JOTM。Atomikos 运行良好,我完全推荐它。我做了例如自动化单元测试来测试我的应用程序中的分布式事务,这些测试工作正常。

As far as JOTM is concerned I am quite sure that it fakes the 2-phase commit protocol at least sometimes. I had a PostgreSQL database with the 2-phase commit capabilities turned off and JOTM was able to work as if I had real distributed transactions. Real transaction managers (e.g. the one implemented in GlassFish) reported an error in such a case.

就 JOTM 而言,我很确定它至少有时会伪造两阶段提交协议。我有一个 PostgreSQL 数据库,关闭了两阶段提交功能,JOTM 能够像我有真正的分布式事务一样工作。在这种情况下,真正的事务管理器(例如在 GlassFish 中实现的事务管理器)报告了一个错误。

I used JPA2 with Hibernate 4 in my application if it matters.

如果重要的话,我在我的应用程序中使用了 JPA2 和 Hibernate 4。