Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

FAQ

How/why/when did the project get started ?

The BTM project started early 2005. Back in time I needed a XA capable transaction manager at many different occasions but couldn't find any satisfying all my needs: standalone, stable, actively maintained, production usable, open source. Unfortunately there were only two choices: JOTM and Tyrex which both were unusable for production as they lacked recovery (and more).

So I started working on BTM in my spare time until JBoss acquired Arjuna's product and released it as open source. I thought that would be the end of my project but their product's usability was far from satisfying so I just went on coding BTM.

By mid-2006, I finally had something usable that I thought was worth showing the world. It took another six month and eleven releases (archived here: http://www.bitronix.be/Btm/Download) before I considered BTM was up to my needs. During that period, a small but faithful community of users appeared and encouraged me to continue working on BTM.

Just before version 1.0, BTM migrated from a all-on-my-own-pc-and-my-website development environment to CodeHaus. This helped a lot making the project way more open to the community as well as providing me with free access to very much needed tools. Thanks for that, guys !

Why would I need a transaction manager ?

If you either use two databases (or more) in your application or you use both a database and JMS then you need a transaction manager. Some people will argue that you can do without one even if you fall in on of those two cases. They are true: it is possible to have a transaction span two resources (like JMS and JDBC) by writing so-called idempotent methods manipulating these resources and some simple error recovery logic.

Idempotent methods

Icon

The Wikipedia definition of idempotent is: A unary operation is idempotent if, whenever it is applied twice to any element, it gives the same result as if it were applied once.

Idempotent methods can be called as many times as you want without doing anything different than if they were only called once.

The fact is that it is harder to write idempotent methods (when it is possible at all) and you also have to write some recovery logic to handle crash cases. It is more or less easy to write code that makes sure the information gets registered at least once. Idempotent methods make sure that in case they got called twice (because of a retrial after a crash) data will be safe anyway.

Why would you have to accept those constraints when you can get free of them ? And why would you have to be careful about low-level logic in your code when you can delegate it to an component specialized in this task ?

Would you write your own web framework or your own ORM nowadays ? Neither would I. It is the transaction manager's job to make sure consistency is kept across multiple resources, not yours.

Why using BTM and not insert another TM here ?

In short: because it is complete and easy to use.

BTM has been tailored to support only the most common scenarios: XA with JDBC and / or JMS. It's internal logic is kept as simple as possible to only support them. On the other hand, great care has been taken to make those scenarios working as best and as easily as possible. BTM also fully supports crash recovery thanks to its disk logger.

You might need more than what BTM proposes, like JCA Connectors support or JTS. In that case you should look at other available products.

  • No labels