Database Configuration
From Resin 3.0
(renamed tag to directive) |
|||
(One intermediate revision by one user not shown) | |||
Line 3: | Line 3: | ||
== Connection Configuration== | == Connection Configuration== | ||
− | The JDBC connections can be initialized with specified values of the transaction-isolation, catalog, and read-only values. The <connection> | + | The JDBC connections can be initialized with specified values of the transaction-isolation, catalog, and read-only values. The <connection> directive configures these: |
==== resin.conf ==== | ==== resin.conf ==== | ||
Line 15: | Line 15: | ||
</connection> | </connection> | ||
</database> | </database> | ||
+ | |||
+ | == Transaction (XA) Configuration == | ||
+ | |||
+ | {{:xa}} |
Latest revision as of 20:21, 21 February 2006
Contents |
[edit] Connection Configuration
The JDBC connections can be initialized with specified values of the transaction-isolation, catalog, and read-only values. The <connection> directive configures these:
[edit] resin.conf
<database jndi-name="jdbc/example"> <driver> ... </driver> <connection> <transaction-isolation>read-committed</transaction-isolation> <read-only/> </connection> </database>
[edit] Transaction (XA) Configuration
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>