Message-ID: <1542939986.443.1369165379046.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_442_533980495.1369165378609" ------=_Part_442_533980495.1369165378609 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 transaction manager at many different oc= casions but couldn't find any satisfying all my needs: standalone, stable, = actively maintained, production usable, open source. Unfortunately there we= re 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 m= y spare time until JBoss acquired Arjuna's product and released it as open = source at the end of 2005. I thought that would be the end of my project bu= t their product's usability was far from satisfying at the time so I just w= ent 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<= /a>) before I considered BTM was up to my needs. During that period, a smal= l but faithful community of users appeared and encouraged me to continue wo= rking on BTM. Thanks for that, guys !
About the same story a= s for Arjuna repeated at the end of 2006 when Atomikos released their impre= ssive product as open source. But BTM already had a community and some user= s were already planning to go to production with BTM 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-website development environment to CodeHaus. This help= ed a lot making the project way more open to the community as well as provi= ding me with free access to very much needed tools. Thanks for that, gu= ys !
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 po= ssible to have a transaction span two resources (like JMS and JDBC) by writ= ing so-called idempotent methods manipulating these resour= ces and some simple error recovery logic.
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.
I= dempotent methods can be called as many times as you want without doing any= thing different than if they were only called once.
The fact is that it is harder to write idempotent methods (when it i= s 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 inf= ormation gets registered at least once. Idempotent methods make sure that i= n 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-l= evel logic in your code when you can delegate it to an component specialize= d in this task ?
Would you write your own web framework or your own O= RM nowadays ? Neither would I. It is the transaction manager's job to make = sure atomicity is kept across multiple resources, not yours.
Shards is a new datab= ase design that started making noise recently. The basic idea is to divide = your data between multiple cheap servers, each one handling a small fractio= n of your data. If you want to know more about shards, read this article.
The first one explicitly states that XA is required to mainta= in atomicity between all nodes while Hibernate does not explicitly document= this but the developers openly agreed that XA also is a prerequisite to at= omicity, see http://groups.google.com/group/hibernate-shards-dev/browse_thread/thr= ead/a1bf86180f6ecf63 and http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-49.<= /p>
In short: because it is complete= and easy to use.
BTM has been tailored to support only the most comm= on scenarios: XA with JDBC and / or JMS. It's internal logic is kept as sim= ple as possible to only support them. On the other hand, great care has bee= n 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.
See next question. You should also know that there was a bug in ve= rsion 1.1 that allowed BTM to start up even when a resource could not be re= covered (BTM-2). This bug has been fixed in version 1.2= .
BTM tries to recover all resources during startup. If i= t fails on one of them, it will refuse to start and throw this exception:= p>
Oracle resources can only be recovered when the configured u= ser has these privileges:
Yes. Oracle 11g r=
elease 1 does not require this privilege anymore. It seems that Oracle also=
has a patch to backport this functionality to previous versions of the dat=
abase (bug 5945463). Details about which versions can be fixed by this patc=
h 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 it.
See: http://docs.oracle.com/cd= /B28359_01/java.111/b31224/xadistra.htm#sthref1311
BTM can run in multiple=
virtual machines working on the same resources in parallel but you must re=
member to enable currentNodeOnlyRecovery in the configuration when doing so=
. See here to know why.