Message-ID: <1686309116.297808.1368862800695.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_297807_1075003714.1368862800152" ------=_Part_297807_1075003714.1368862800152 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
There is one caveat with = Last Resource Commit. There is a small chance that a transaction ends up wi= th inconsistent results across participating resources if BTM crashes while= a transaction is in-flight. The chance is small but it exists so be carefu= l when using that feature. This is in no way a limitation of BTM b= ut of the concept itself.
Please note that if you only intend to run transactions against a single= database using Last Resource Commit this scenario is 100% safe, otherwise = not.
In theory, only databases supporting XA and providing a
XADataSource implementation can be used with transaction managers. I=
n practice, there is a way around this limitation.
The Last Resource Commit optimization (sometimes referred to as Last Res= ource Gambit or Last Agent optimization) allows a single non-XA database to= participate in a XA transaction by cleverly ordering the resources.
|Maximum one non-XA resource|
Ther= e can be at most one datasource emulating XA with Last Resource Commit part= icipating in a transaction. If it happens that you're trying to use a secon= d emulating datasource while one has already been used, BTM will throw an e= xception. Again, this is not a limitation of BTM but of the concept itself.=
To enable it, you just have to create a
sing the bit=
ronix.tm.resource.jdbc.lrc.LrcXADataSource as the
Here's an example of code configuring a HSQLDB datasource:
and the same example viewed as a Resource Loader configuration
|Mandatory pool settings|
The LRC implementation relies on the
BTM 1.3.1 and higher are immune to this problem as these settings are en=
------=_Part_297807_1075003714.1368862800152 Content-Type: image/gif Content-Transfer-Encoding: base64 Content-Location: file:///C:/shim.gif R0lGODlhAQABAIAAANvf7wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw== ------=_Part_297807_1075003714.1368862800152--