NonStop Server Guide for BEA WebLogic Server 8.1

XA Resource Manager (XARM)
HP NonStop Server Guide for BEA WebLogic Server 8.1529891-001
6-10
Additional Considerations for JDBC Access to
SQL/MX DataBases
commit or rollback the transaction, the WebLogic Server calls the JDBC driver to
perform the commit/rollback. The JDBC/MX driver ignores this request because
the transaction is managed externally to the JDBC driver. During commit
processing, the WebLogic Server coordinates with the static resource manager to
drive the TMF transaction to completion
This transactional data source can be used with the WebLogic Server containers
that require XA-aware resources, like the WebLogic Server CMP. A restriction is
that only one NonStop server data source can take part in the global transaction.
Note that each data source is an independent XA resource. To use this method
effectively, it is desirable to define a single TxDataSource object in the WebLogic
Server configuration to access the SQL/MX database. Note that even if only the
JDBC/MX resources are involved in the transaction, WebLogic Server will do a 2-
phase commit processing involving the static XA resource manager and the
WebLogic Server XA wrapper resources associated with each of the
TxDataSource object.
3. Configure a TxDataSource object using the WLSTxSQLMXDataSource JDBC
XADataSource driver provided with the WebLogic Server.
This driver implements the XA interfaces (XADataSource and XAConnection)
using the JDBC/MX driver facilities. In this case as in the previous cases, the
JDBC/MX driver operates in the context of an external TMF transaction (one not
started by the JDBC driver itself). During commit processing, the WebLogic Server
coordinates with the static resource manager to drive the TMF transaction to
completion.
Just like the TxDataSource configured in Option 2 above, this also can be used
with CMP configuration.
An important thing to note is that, in this case, the WebLogic Server JDBC wrapper
drivers know that the JDBC/MX driver has a resource-specific XA resource object.
Therefore, the WebLogic Server expects that the JDBC connection be used as in
the J2EE model. In the J2EE model, an application that uses JDBC connections is
supposed to use the "acquire, use and release" model. If a connection reference is
kept between method invocations under different transaction contexts, runtime
errors will occur.