Technical data

16 Managing JDBC Connectivity
16-20 Administration Guide
Additional XA Connection Pool Properties
When using connections from a connection pool in distributed transactions, you may
need to set additional properties for the connection pool so that the connection pool
handles the connection properly within WebLogic Server in the context of the
transaction. You set these properties in the configuration file (
config.xml) within the
JDBCConnectionPool tag. By default, all additional properties are set to false. You
set the properties to true to enable them.
In many cases, WebLogic Server automatically sets the proper value for these
properties internally so that you do not have to set them manually.
KeepXAConnTillTxComplete
Some DBMSs require that you start and end a transaction in the same physical
database connection. In some cases, a transaction in WebLogic Server may start in one
physical database connection and end in another physical database connection. To
force a connection pool to reserve a physical connection and provide the same
connection to an application throughout transaction processing until the transaction is
complete, you set
KeepXAConnTillTxComplete="true". For example:
<JDBCConnectionPool KeepXAConnTillTxComplete="true"
DriverName="com.sybase.jdbc2.jdbc.SybXADataSource"
CapacityIncrement="5" InitialCapacity="10" MaxCapacity="25"
Name="demoXAPool" Password="{3DES}vIF8diu4H0QmdfOipd4dWA=="
Properties="User=dbuser;DatabaseName=dbname;ServerName=server_nam
e_or_IP_address;PortNumber=serverPortNumber;NetworkProtocol=Tds;r
esourceManagerName=Lrm_name_in_xa_config;resourceManagerType=2" />
Note: This property is required to support distributed transactions with DB2 and
Sybase.
Configuring Non-XA JDBC Drivers for Distributed
Transactions
When configuring the JDBC Connection Pool to allow non-XA JDBC drivers to
participate with other resources in distributed transactions, specify the Enable
Two-Phase Commit attribute for the JDBC Tx Data Source. (This parameter is ignored
by resources that support the
XAResource interface.) Note that only one non-XA
connection pool at a time may participate in a distributed transaction.