Fusion Middleware Control Help for WebLogic Server

Previous Next Open TOC in new window
Content starts here

JDBC Module: Configuration: Transactions

Configuration Options     

The transaction protocol for a JDBC data source determines how connections from the data source are handled during transaction processing. Transactions within a JDBC data source are either global (XA) or non-global (local).

This page enables you to define transaction options for this JDBC data source.

Configuration Options

Name Description
Supports Global Transactions

Select this option to enable non-XA connections from the data source to participate in global transactions.

In most cases, if your application includes global transactions, you should use an XA JDBC driver to create database connections. You may need to enable this option for use with EJBs. If you enable support for global transactions with a non-XA JDBC driver, you must select an option for transaction processing.

MBean Attribute (Does not apply to application modules) :
JDBCDataSourceParamsBean.GlobalTransactionsProtocol

Changes take effect after you redeploy the module or restart the server.

Logging Last Resource

Enables a non-XA JDBC connection to participate in distributed transactions using the Logging Last Resource (LLR) transaction optimization. Recommended in place of Emulate Two-Phase Commit.

With this option, the transaction branch in which the connection is used is processed as the last resource in the transaction and is processed as a one-phase commit operation. The result of the operation is written in a log file on the resource itself, and the result determines the success or failure of the prepare phase of the transaction. This option offers some performance benefits with greater data safety than Emulate Two-Phase Commit.

Emulate Two-Phase Commit

Enables a non-XA JDBC connection to emulate participation in distributed transactions using JTA. Select this option only if your application can tolerate heuristic conditions.

With this option, the transaction branch in which the connection is used always returns success for the prepare phase of the transaction. This option offers performance benefits, but also has risks to data in some failure conditions.

One-Phase Commit

Enables a non-XA JDBC connection to participate in distributed transactions using the one-phase commit transaction processing. With this option, no other resources can participate in the global transaction.

Use XA Data Source Interface

Specifies that WebLogic Server should use the XA interface of the JDBC driver.

If the JDBC driver class used to create database connections implements both XA and non-XA versions of a JDBC driver, you can set this attribute to indicate that WebLogic Server should treat the JDBC driver as an XA driver or as a non-XA driver.

MBean Attribute (Does not apply to application modules) :
JDBCDriverParamsBean.UseXaDataSourceInterface

Changes take effect after you redeploy the module or restart the server.

Set XA Transaction Timeout

Enables WebLogic Server to set a transaction branch timeout based on the value for XaTransactionTimeout.

When enabled, the WebLogic Server Transaction Manager calls XAResource.setTransactionTimeout() before calling XAResource.start, and passes either the XA Transaction Timeout value or the global transaction timeout.

You may want to set a transaction branch timeout if you have long-running transactions that exceed the default timeout value on the XA resource.

Note: To use this feature, the resource manager (typically, the JDBC driver) must support the javax.transaction.xa.XAResource.setTransactionTimeout() method.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.XaSetTransactionTimeout

Changes take effect after you redeploy the module or restart the server.

XA Transaction Timeout

The number of seconds to set as the transaction branch timeout.

If set, this value is passed as the transaction timeout value in the XAResource.setTransactionTimeout() call on the XA resource manager, typically the JDBC driver.

When this value is set to 0, the WebLogic Server Transaction Manager passes the global WebLogic Server transaction timeout in seconds in the method.

If set, this value should be greater than or equal to the global WebLogic Server transaction timeout.

Note: You must enable XaSetTransactionTimeout to enable setting the transaction branch timeout.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.XaTransactionTimeout

Changes take effect after you redeploy the module or restart the server.

XA Retry Duration

Determines the duration in seconds for which the transaction manager will perform recover operations on the resource. A value of zero indicates that no retries will be performed.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.XaRetryDurationSeconds

Changes take effect after you redeploy the module or restart the server.

XA Retry Interval

The number of seconds between XA retry operations if XARetryDurationSeconds is set to a positive value.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.XaRetryIntervalSeconds

Changes take effect after you redeploy the module or restart the server.

Keep XA Connection Until Transaction Complete

Enables WebLogic Server to associate the same XA database connection from the connection pool with a global transaction until the transaction completes.

Only applies to connection pools that use an XA driver.

Use this setting to work around specific problems with JDBC XA drivers.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.KeepXaConnTillTxComplete

Changes take effect after you redeploy the module or restart the server.

Keep Connection After Local Transaction

Enables WebLogic Server to keep the physical database connection associated with the logical connection when committing a local transaction instead releasing it and getting another physical connection when needed.

Setting this option to true may require additional connections to be configured on the database.

Use this setting to work around specific problems with JDBC XA drivers.

MBean Attribute (Does not apply to application modules) :
JDBCDataSourceParamsBean.KeepConnAfterLocalTx

Changes take effect after you redeploy the module or restart the server.

Keep Connection After Global Transaction

Enables WebLogic Server to keep the physical database connection associated with the logical connection when committing a global transaction instead releasing it and getting another physical connection when needed.

Setting this option to true may require additional connections to be configured on the database.

Use this setting to work around specific problems with JDBC XA drivers.

MBean Attribute (Does not apply to application modules) :
JDBCDataSourceParamsBean.KeepConnAfterGlobalTx

Changes take effect after you redeploy the module or restart the server.

Need Transaction Context On Close

Specifies whether the XA driver requires a distributed transaction context when closing various JDBC objects (result sets, statements, connections, and so forth). Only applies to connection pools that use an XA driver.

When enabled, SQL exceptions that are thrown while closing the JDBC objects without a transaction context will be suppressed.

Use this setting to work around specific problems with JDBC XA drivers.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.NeedTxCtxOnClose

Changes take effect after you redeploy the module or restart the server.

XA End Only Once

Specifies that XAResource.end() is called only once for each pending XAResource.start().

This option prevents the XA driver from calling XAResource.end(TMSUSPEND) and XAResource.end(TMSUCCESS) successively. Only applies to data sources that use an XA driver.

Use this setting to work around specific problems with JDBC XA drivers.

This option is deprecated. Its value is currently ignored.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.XaEndOnlyOnce

Changes take effect after you redeploy the module or restart the server.

Keep Connection Open On Release

Enables WebLogic Server to keep the logical JDBC connection open for a global transaction when the physical XA connection is returned to the connection pool.

Select this option if the XA driver used to create database connections or the DBMS requires that a logical JDBC connection be kept open while transaction processing continues (although the physical XA connection can be returned to the connection pool).

Only applies to data sources that use an XA driver.

Use this setting to work around specific problems with JDBC XA drivers.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.KeepLogicalConnOpenOnRelease

Changes take effect after you redeploy the module or restart the server.

Resource Health Monitoring

Enables JTA resource health monitoring for an XA data source. When enabled, if an XA resource fails to respond to an XA call within the period specified in MaxXACallMillis, WebLogic Server marks the data source as unhealthy and blocks any further calls to the resource.

This property applies to XA data sources only, and is ignored for data sources that use a non-XA driver.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.ResourceHealthMonitoring

Changes take effect after you redeploy the module or restart the server.

Recover Only Once

Specifies that the transaction manager calls recover on the resource only once. Only applies to data sources that use an XA driver.

Use this setting to work around specific problems with JDBC XA drivers.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.RecoverOnlyOnce

Changes take effect after you redeploy the module or restart the server.

Rollback Local Tx Upon Connection Close

Enables WebLogic Server to call rollback() on the connection before returning the connection to the connection pool.

Enabling this attribute will have a performance impact as the rollback call requires communication with the database server.

This option is deprecated. Its value is currently ignored.

MBean Attribute (Does not apply to application modules) :
JDBCXAParamsBean.RollbackLocalTxUponConnClose

Changes take effect after you redeploy the module or restart the server.

XA Debug Level

Specifies level of JDBC debugging for XA drivers, where larger values in the range provide more debugging information.

MBean Attribute (Does not apply to application modules) :
JDBCConnectionPoolParamsBean.JDBCXADebugLevel

Minimum value: 0

Maximum value: 100

Changes take effect after you redeploy the module or restart the server.


Back to Top