Atomikos vs JOTM vs Bitronix vs? [closed]
Asked Answered
P

2

41

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.

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?

Psalmody answered 4/6, 2010 at 22:30 Comment(0)
S
50

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.

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.

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 acquisition for some history) and does offer support.

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

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

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

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

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

Salomie answered 4/6, 2010 at 23:30 Comment(3)
Thank you for this helpful answer. Sometimes, for testing and demonstration purposes mostly, our application needs to run in Jetty or Tomcat. Will Atomikos and JBossTS still work in those environments? In fact, it that the reason for these third party transaction managers? To get good transaction support outside a full-fledged app server?Psalmody
@HDave: Standalone transaction managers are useful when you need global transactions support (i.e. when you are dealing with more than one transactional resource) and your environment doesn't offer support for this (e.g. a standalone application, a servlet container). In such environments, I'd use Spring to ease the configuration (and JBossTS and Atomikos would fit).Salomie
Jencks is in fact a JCA container using the GeronimoTM as a JTA transaction manager...Lenten
F
7

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.

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.

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

Flaring answered 16/2, 2012 at 21:19 Comment(3)
Interesting comment on how JTOM fakes the 2-phase commit protocol. The JTA manager/drivers that are provided with WebLogic also do the same. Better to have them fake it when presented with a db that does not support it (or has it turned off.)Mercenary
Usually you can have a single non-XA resource in an XA transaction. If your transaction manager recognizes this situation it will call prepare() on the XA resources, should that succeed it can then call commit() on all the resources involved in the transaction including the non-XA resource.Northrop
Yeah they call that the casting vote. The non XA resource gets to decide if it all worksGeniegenii

© 2022 - 2024 — McMap. All rights reserved.