Xa
From Resin 3.0
(Difference between revisions)
(renamed tag to directive) |
|||
Line 1: | Line 1: | ||
[[Category:Configuration]] [[Category:Database]] | [[Category:Configuration]] [[Category:Database]] | ||
− | The <xa> | + | The <xa> directive in the <[[database]]> configuration specifies how the connections should participate in distributed transactions. |
If true, connections automatically participate in any [[distributed transaction]], i.e. a [[UserTransaction]].begin() will enlist the connection into the new transaction and commit() will commit the transactions. | If true, connections automatically participate in any [[distributed transaction]], i.e. a [[UserTransaction]].begin() will enlist the connection into the new transaction and commit() will commit the transactions. |
Latest revision as of 20:24, 21 February 2006
The <xa> directive in the <database> configuration specifies how the connections should participate in distributed transactions.
If true, connections automatically participate in any distributed transaction, i.e. a UserTransaction.begin() will enlist the connection into the new transaction and commit() will commit the transactions.
The default value is true.
[edit] Non-transactional data sources
In some cases, it is convenient to have a transactional (xa) data source and a non-transactional data source to the same database. For example, a connection that only selects data from read-only tables does not need to participate in a transaction. In that case, it is more efficient to mark the read-only connection as non-transactional by setting <xa>false</xa>