BEA WebLogic Server Tuning Guide

12
3.3 Configuring a Connection Pool with the XA Driver
The alternative to creating a connection pool with the non-XA JDBC/MX Driver name is to create it with the XA-
aware driver. The Connection pool can then be used to create transactional Datasources that can be used in global
transactions involving multiple resources such as JMS.
The XADataSource name for SQL/MX (instance of javax.sql.XADataSource) is
com.hp.nsk.xares.WLSTxSQLMXDataSource.
The JDBC/MX drivers that are part of the JDBC/MX product do not support the XAResource interface because XA is
not used in the NonStop server for coordination of NonStop server Resources. However, WebLogic Server expects
a JDBC driver to support the XADataSource interface to fully participate in global transactions, or when a
Datasource is configured for container managed services (like CMP). So, the XA-aware driver for SQL/MX is
provided with the HP NonStop Server Toolkit for BEA WebLogic Server 8.1 SP3
7
.
As with the non-XA Driver, it is recommended to enable statement pooling for the Connections by specifying the
system property maxStatements or configuring the Connection pool with the property maxStatements.
3.4 Configuring a Non-Transactional Datasource
To configure a non-transactional Datasource in WebLogic Server, the underlying connection pool can be configured
with the XA-aware driver or the non-XA aware driver. It is recommended that the non-transactional DataSource for
SQL/MX be configured with the non-XA driver instead of the JDBC/MX XA-aware driver. Note that as far as
WebLogic Server is concerned, the connections acquired from this Datasource do not take part in the WebLogic
Server global transactions.
However, on HP NonStop servers, a static XA resource manager is configured in each instance of WebLogic
Server. This static XA resource manager is enlisted in all WebLogic Server transactions, providing the TMF
transaction context. So, whenever a WebLogic Server transaction is started (either explicitly or using declarative
transactions), a corresponding TMF transaction with the same scope as the WebLogic Server global transaction is
started. This TMF transaction provides the pervasive transaction context for all NonStop resources accessed within
the context of the WebLogic Server transaction.
So, even though the WebLogic Server transaction manager is not aware of it, the WebLogic Server Transaction is
also indirectly providing the scope for the work done through non-transactional Datasources. Depending on the
number of resources participating in a transaction, WebLogic Server Transaction Manager can perform several
optimizations for efficient transaction management
8
.
Servlets, Session Beans, etc. can use the non-transaction DataSource with TMF protection achieved through the static
resource manager. If the only resource accessed is SQL/MX, the one-phase commit optimization of the WebLogic
Server TM can provide significant performance benefits.
3.5 Configuring a Transactional Datasource
To configure a non-transactional Datasource in WebLogic Server, the underlying connection pool can be configured
with the XA-aware driver or the non-XA aware driver.
7
For clarity, we hereafter refer to this as WebLogic Server NonStop Server Toolkit.
8
These optimizations include one-phase commit optimizations and read-only optimizations where the WebLogic Server Transaction Manager can do away with
writing log records if all or all but one participating resources do not report modified state.