Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Bitronix Transaction Manager
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>Overview of the BTM JTA Transaction Manager</h1> <p>The Bitronix Transaction Manager (BTM) is a simple but complete implementation of the JTA 1.0.1B API. The goal is to provide a fully working XA transaction manager that provides all services required by the JTA API while trying to keep the code as simple as possible for easier understanding of the XA semantics. This is BTM's strongest point compared to its competitors: when something goes wrong it is much easier to figure out what to do thanks to the great care placed in useful error reporting and logging.</p> <h4>Contents</h4> <img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzptYXhMZXZlbD0zfG1pbkxldmVsPTJ9&locale=en_GB&version=2" data-macro-name="toc" data-macro-parameters="maxLevel=3|minLevel=2"> <h2>Pragmatic description</h2> <p>BTM is a perfect choice for a project using the Spring framework and willing to leverage <a href="http://www.springframework.org/docs/reference/transaction.html">Spring's transactions capabilities</a> by using the <a href="http://www.springframework.org/docs/api/org/springframework/transaction/jta/JtaTransactionManager.html">JtaTransactionManager</a> facade. You can safely mix JDBC and JMS accesses in a single unified transaction while you can use Spring's JDBC or JMS Templates with very good performance as BTM ships with efficient pools for both resource types.</p> <p>It is also possible to integrate BTM in web containers like Tomcat or Jetty and get raw access to a JTA implementation to integrate for instance with Hibernate to get automatic session context management.</p> <p>BTM has proved to be stable and mature enough to be used in production by at least two major corporations where it has been running flawlessly (and is still running) for months.</p> <h2>Current status</h2> <p>Currently BTM is very stable and usable. JDBC and JMS resources are working pretty well and recovery after crash works plain fine thanks to the embedded disk journal. It has been so since the early alpha releases because thorough testing is done before any release.</p> <p>Normally, only XA aware resources can participate in global transactions (with a special exception for JDBC) which means there are three resource types that can be used:</p> <h3>JDBC</h3> <p>For JDBC, the driver must provide an implementation of the <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/XADataSource.html">javax.sql.XADataSource</a> interface. Please note that the underlying database must also provide some support to the driver one way or another. It is not possible to write a JDBC driver supporting XA for a database that does not support it. On the other hand, it is possible to write a driver that fakes XA support and this solution has been used by some vendors.</p> <p>BTM also provides a way to allow any JDBC driver to take part in a XA transaction by emulating XA with the Last Resource Commit optimization. You can read more about this feature <a class="confluence-link" href="/display/BTM/LastResourceCommit12" data-linked-resource-id="7208968" data-linked-resource-type="page" data-linked-resource-default-alias="LastResourceCommit12" data-base-url="http://docs.codehaus.org">in the documentation</a>.</p> <p>A list of databases that have been tested with BTM is being maintained <a class="confluence-link" href="/display/BTM/JdbcXaSupportEvaluation" data-linked-resource-id="10748312" data-linked-resource-type="page" data-linked-resource-default-alias="JdbcXaSupportEvaluation" data-base-url="http://docs.codehaus.org">here</a>. </p> <h3>JMS</h3> <p>For JMS, your vendor must provide an implementation of the <a href="http://java.sun.com/j2ee/1.4/docs/api/javax/jms/XAConnectionFactory.html">javax.jms.XAConnectionFactory</a> interface. The same remark as for JDBC holds: only implementations truly supporting XA (or trying to) have been considered.</p> <p>A list of JMS servers that have been tested with BTM is being maintained <a class="confluence-link" href="/display/BTM/JmsXaSupportEvaluation" data-linked-resource-id="80805991" data-linked-resource-type="page" data-linked-resource-default-alias="JmsXaSupportEvaluation" data-base-url="http://docs.codehaus.org">here</a>. </p> <h3>JCA</h3> <p>JCA connectors could potentially be used too but BTM currently lacks support for them.<br /> <img class="confluence-embedded-image confluence-external-resource" src="http://www.bitronix.be/images/shim.gif" data-image-src="http://www.bitronix.be/images/shim.gif"></p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced