Message-ID: <1247436381.8505.1422836455745.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8504_622329553.1422836455745" ------=_Part_8504_622329553.1422836455745 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The BTM project started early 2005. Back in time I needed a XA capable t= ransaction manager at many different occasions but couldn't find any satisf= ying all my needs: standalone, stable, actively maintained, production usab= le, 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 at the end of 2005. I thought tha= t would be the end of my project but their product's usability was far from= satisfying at the time so I just went on coding BTM.
By mid-2006, I finally had something usable that I thought was worth sho= wing the world. It took another six month and eleven releases (archived her= e: http://www.bitronix.be/Btm/Download) before I consider= ed BTM was up to my needs. During that period, a small but faithful communi= ty of users appeared and encouraged me to continue working on BTM. Than= ks for that, guys !
About the same story as for Arjuna repeated at the end of 2006 when Atom= ikos released their impressive product as open source. But BTM already had = a community and some users were already planning to go to production with B= TM and waited for version 1.0 to be released.
Just before version 1.0, BTM migrated from a all-on-my-own-pc-and-my-web= site development environment to CodeHaus. This helped a lot making the proj= ect way more open to the community as well as providing me with free access= to very much needed tools. Thanks for that, guys !
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 th= ose two cases. They are true: it is possible to have a transaction= span two resources (like JMS and JDBC) by writing so-called idempo= tent methods manipulating these resources and some simple error re= covery logic.=20 =20
The fact is that it is harder to write idempotent methods (when it is po= ssible at all) and you also have to write some recovery logic to handle cra= sh cases. It is more or less easy to write code that makes sure the informa= tion gets registered at least once. Idempotent methods make sure that in ca= se 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 c= ode when you can delegate it to an component specialized in this task ?
Would you write your own web framework or your own ORM nowadays ? Neithe= r would I. It is the transaction manager's job to make sure atomicity is ke= pt across multiple resources, not yours.
Shards is a new database design that started making noise recently. The = basic idea is to divide your data between multiple cheap servers, each one = handling a small fraction of your data. If you want to know more about shar= ds, read this article.
The first one explicitly states that XA is required to maintain atomicit= y between all nodes while Hibernate does not explicitly document this but t= he developers openly agreed that XA also is a prerequisite to atomicity, se= e http:= //groups.google.com/group/hibernate-shards-dev/browse_thread/thread/a1bf861= 80f6ecf63 and http://ope= nsource.atlassian.com/projects/hibernate/browse/HSHARDS-49.
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 on= ly 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 suppor= ts 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.
See next question. You should also know that there was a bug in version = 1.1 that allowed BTM to start up even when a resource could not be recovere= d (BTM-2). This bug has been fixed in version 1.2.
BTM tries to recover all resources during startup. If it fails on one of= them, it will refuse to start and throw this exception:
Oracle resources can only be recovered when the configured user has thes= e privileges:
Yes. Oracle 11g release 1 does not require this privilege anymore. It se=
ems that Oracle also has a patch to backport this functionality to previous=
versions of the database (bug 5945463). Details about which versions can b=
e fixed by this patch hasn't been disclosed and it is also not possible to =
freely download it, you have to contact Oracle support to get your hands on=
See: http:= //docs.oracle.com/cd/B28359_01/java.111/b31224/xadistra.htm#sthref1311<= /p>
BTM can run in multiple virtual machines working on the same resources i=
n parallel but you must remember to enable currentNodeOnlyRecovery in the c=
onfiguration when doing so. See here to know why.