WebLogic Server (WLS) 7.0
XA Resource Manager (XARM)
HP NonStop Server Platform Guide for WebLogic Server—525779-001
5-9
Additional Considerations for JDBC Access to
SQL/MX DataBases
To configure non-transactional data sources, a connection pool using the default JDBC
driver, or the wrapper JDBC driver can be specified.
Additional Considerations for JDBC Access to
SQL/MX DataBases
When the NonStop XA resource is registered statically with the WebLogic Server, all
subsequent access to the SQL/MX database within the scope of the WebLogic Server
transaction is automatically protected by the TMF transaction imported as a branch to
the WebLogic Server transaction.
There are three possible configuration options when configuring the WebLogic Server
data sources to access SQL/MX:
1. Configure a WebLogic Server JDBC data source based on the Type 2 JDBC/MX
driver.
In this configuration, a WebLogic Server data source object is created based on
the JDBC/MX driver. The data source is not an XA-aware resource, so it cannot be
used with WebLogic containers that require an XA-aware JDBC driver (such as the
Container-Managed Persistence Service (CMP) container).
If a WebLogic Server transaction is started before the invocation of the component
that uses the WebLogic Server JDBC data source, either initiated by the client or
container-initiated transactions based on declarative requirements of the
component, all the JDBC access by the component will be within the context of the
imported transaction. The JDBC/MX driver operates in the context of an external
TMF transaction (one not started by the JDBC/MX driver itself). Therefore, the
application components should not call commit/rollback method of the JDBC/MX
driver to commit/rollback the database work. Instead, the JTA methods for
commiting/rolling back should be used.
During commit processing, the WebLogic Server will coordinate with the static
resource manager to drive the TMF transaction to completion. This is the most
efficient use of JDBC/MX with the WebLogic Server. It allows the WebLogic Server
to do one-phase commit optimization (if no other XA resource other than the static
XA resource manager is involved in the transaction) and lets TMF perform one-
phase commits efficiently.
2. Configure a WebLogic Server JDBC transactional data source based on the Type
2 JDBC/MX driver.
In this configuration, a TxDataSource object is created based on a non XA-aware
driver by setting the EnableTwoPhaseCommit attribute to true in the data source
configuration.
The WebLogic Server provides an XA wrapper on top of JDBC/MX. The JDBC/MX
driver operates in the context of an external TMF transaction (one not started by
the JDBC driver itself). The WebLogic Server-provided XA wrapper does not run
real transaction management. When the application calls the JTA methods to