|
|
| |
Using Third-Party JDBC XA Drivers with WebLogic Server
The following sections describe how to use JDBC XA drivers in WebLogic Server transactions:
Overview of Third-Party XA Drivers
This section provides an overview to using third-party JDBC two-tier drivers with WebLogic Server in distributed transactions. These drivers provide connectivity between WebLogic Server and the DBMS. Drivers used in distributed transactions are designated by the driver name followed by /XA; for example, Oracle Thin/XA Driver.
Table of Third-Party XA Drivers
The following table summarizes known functionality of these third-party JDBC/XA drivers when used with WebLogic Server 6.1:
Driver/Database Version |
Comments |
---|---|
Type 2 XA Drivers (native .dll) |
|
IBM DB2 |
|
Type 4 XA Drivers (all-Java) |
|
Oracle Thin Driver XA |
See Using Oracle Thin 8.1.7/XA Driver.
|
Sybase jConnect/XA |
See Using Sybase jConnect 5.2.1/XA Driver. |
Cloudscape |
See Software Requirements for the Cloudscape 3.5.1/XA Driver. |
Third-Party Driver Configuration and Performance Requirements
Here are requirements and guidelines for using specific third-party X/A drivers with with WebLogic Server.
Note: You may need to set additional connection pool properties when using third-party drivers not listed here. See Additional XA Connection Pool Properties in the Administration Guide.
Using Oracle Thin 8.1.7/XA Driver
The following sections provide information for using the Type 4 Oracle Thin 8.1.7/XA Driver with WebLogic Server 6.1.
Software Requirements for the Oracle Thin 8.1.7/XA Driver
The Oracle Thin 8.1.7/XA Driver requires the following:
Known Oracle Thin 8.1.7/XA Issues
These are the known issues and BEA workarounds::
Set the Environment for the Oracle Thin 8.1.7/XA Driver
Set the environment as follows:
Enable the database server for XA
If the above steps are not performed on the database server, normal XA database queries and updates may work fine. However, when the Weblogic Server Transaction Manager performs recovery on a re-boot after crash, recover for the Oracle resource will fail with XAER_RMERR.
Oracle Thin 8.1.7/XA Driver Configuration Properties
The following table contains sample code for configuring a Connection Pool:
The following table contains sample code for configuring a TxDataSource:
Property Name |
Property Value |
---|---|
Name |
jtaXADS |
Targets |
myserver,server1 |
JNDIName |
jtaXADS |
PoolName |
jtaXAPool |
Using Sybase jConnect 5.2.1/XA Driver
The following sections provide important configuration information and performance issues when using the Sybase jConnect Driver 5.2.1/XA Driver.
Known Sybase jConnect 5.2.1/XA Issues
These are the known issues and BEA workarounds:
Set the Environment for the Sybase jConnect/XA Driver
Follow these instructions to setup your environment:
where SYBASE_INSTALL_DIR is the directory where you installed the Sybase driver.
$ SYBASE_INSTALL\xa_config
To prevent deadlocks when running transactions, enable row level lock by default:
Connection Pools for the Sybase jConnect 5.2.1/XA Driver
The following table contains sample code for configuring a Connection Pool:
Where Lrm_name refers to the Logical Resource Manager name.
Note: You must also add KeepXAConnTillTxComplete="true" to the connection pool tag in the config.xml file. See Additional XA Connection Pool Properties in the Administration Guide.
The following table contains sample code for configuring a TxDataSource:
Property Name |
Property Value |
---|---|
Name |
jtaXADS |
Targets |
server1 |
JNDIName |
jtaXADS |
PoolName |
jtaXAPool |
Configuration Properties for Java Client
Set the following configuration properties when running a Java client.
Using Cloudscape 3.5.1/XA Driver
The following sections provide information for using the Type 2 Cloudscape 3.5.1/XA Driver with WebLogic Server 6.1.
Software Requirements for the Cloudscape 3.5.1/XA Driver
The Cloudscape 3.5.1/XA Driver supports JDK 1.3 RC1. For more information, see http://www.cloudscape.com/support/techinfo.jsp.
Known Cloudscape 3.5.1/XA Driver Issues
The following table contains known issues:
Description |
Cloudscape Enhancement Request |
Comments/Workarounds for WebLogic Server 6.1 |
---|---|---|
No known issues. |
|
. |
Set the Environment for the Cloudscape 3.5.1/XA Driver
Set the following environment variables (assuming NT syntax):
Note: Note that the weblogicaux.jar is for the javax classes only.
Cloudscape 3.5.1/XA Driver Configuration Properties
The following table contains sample code for configuring a Connection Pool:
The following table contains sample code for configuring a TxDataSource:
Property Name |
Property Value |
---|---|
Name |
jtaXADS |
Targets |
myserver,server1 |
JNDIName |
jtaXADS |
PoolName |
jtaXAPool |
The following sections describe how to set your environment to use the Type2 DB2 7.2/XA Driver with WebLogic Server 6.1.
Set the Environment for the DB2 7.2/XA Driver
Set your environment as follows:
Where <db2> represents the directory in which the DB2 server is installed.
Limitation and Restrictions using DB2 as an XAResource
A transaction cannot be initiated with a resource that is already associated with a suspended transaction. In this case, a javax.transaction.InvalidTransactionException (attempt to resume an inactive transaction) is thrown. If in between suspend and resume, an intermediate transaction enlists the same resource as used in the suspended transaction, a javax.transaction.invalidtransation exception is thrown. If a different resource is used inside the intermediate transaction, it works fine.
DB2 7.2/XA Driver Configuration Properties
The following table contains sample code for configuring a Connection Pool:
Note: You must also add KeepXAConnTillTxComplete="true" to the connection pool tag in the config.xml file. See Additional XA Connection Pool Properties in the Administration Guide.
The following table contains sample code for configuring a TxDataSource:
Property Name |
Property Value |
---|---|
Name |
jtaXADS |
Targets |
server1 |
JNDIName |
jtaXADS |
PoolName |
jtaXAPool |
Other Third-Party XA Drivers
To use other third-party XA-compliant JDBC drivers, you must include the path to the driver class libraries in your CLASSPATH.
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|