BEA WebLogic Server Tuning Guide

11
pool can be an instance of class java.sql.Driver (for JDBC/MX, this is the com.tandem.sqlmx.SQLMXDriver) or an
instance of javax.sql.XADataSource (for example, com.hp.nsk.xares.WLSTxSQLMXDataSource). The former is
hereafter referred to as the non-XA driver and the latter as the XA driver. Which driver to choose depends primarily
on whether the associated WebLogic Server DataSource will participate in global transactions involving other XA
resources
5
:
If the Datasource will not participate in a transaction involving other XA aware resources, specify the non-
XA driver for the connection pool.
Otherwise, specify the XA Driver.
When configuring connection pools with the non-XA driver, WebLogic Server uses the JDBC driver, which is an
instance of java.sql.Driver (non-XA driver), for creating its Connection Pool. When configuring connection pools
with the XA driver, WebLogic Server uses the XA driver (which is an instance of javax.sql.XADataSource).
From the application administrator perspective, connection pooling for JDBC resources is achieved by configuring
the corresponding JDBCConnectionPool element in the WebLogic Server configuration file. The JDBC driver
connection pooling parameters should be set so they don’t interfere with the WebLogic Server connection pooling
mechanism. Examples of WebLogic Server connection pooling configuration are provided below.
3.2 Configuring a Connection Pool with the non-XA Driver
The JDBC/MX product provides non-XA drivers for accessing NonStop SQL/MX databases. There are
implementations of java.sql.Driver (which is what we will use with WebLogic Server) and also implementations of
the java.sql.DataSource. Version 3.0 of the JDBC/MX product, which works with the NonStop SQL/MX 1.8.5
release, supports both Connection pooling and Statement pooling, conformant with the JDBC specification.
Similarly, Version 3.1 of the JDBC/MX product works with the SQL/MX 2.0 release providing the same
functionality. Additionally, the JDBC/MX 3.1 version also supports LOB data-types as an emulated datatype with the
JDBC driver.
One of the components of the JDBC/MX product is the driver object implementing the java.sql.Driver interface. The
class name of this driver object is com.tandem.sqlmx.SQLMXDriver. When a Connection Pool is created with the
JDBC/MX non-XA java.sql.Driver object as its underlying driver, WebLogic Server understands that the JDBC
Connections acquired from the Connection pool are not XA aware and cannot typically take part in global
transactions involving multiple resources.
When configuring the WebLogic Server Connection Pool, it is recommended that Statement pooling in the JDBC
driver be enabled by specifying the maxstatements property as shown below. When configuring WebLogic
Connection Pools, JDBC driver-specific properties are passed to the driver using the Properties element of the
JDBCConnectionPool configuration element
6
.
Properties=”maxStatements=<number>”
Where <number> is the maximum number of statements in the pool.
An example extract from the WebLogic Server configuration is provided in the following sections.
5
A connection pool configured with the XA driver can also be used by non-transactional datasources.
6
While the configuration for WebLogic Server-configurable components are described in terms of the configuration file (config.xml), it is recommended that the
WebLogic Server Administrator’s console be used.