Database Configuration

From Resin 3.0

Jump to: navigation, search


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:


<database jndi-name="jdbc/example">

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.

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>

Personal tools