|Oracle® Fusion Middleware Programming JTA for Oracle WebLogic Server
12c Release 1 (12.1.1)
Part Number E24377-03
|PDF · Mobi · ePub|
This section provides an overview of XA JDBC drivers with WebLogic Server in distributed transactions. These drivers provide connectivity between WebLogic Server connection pools and the DBMS. Drivers used in distributed transactions are designated by the driver name followed by /XA; for example, Oracle Thin/XA Driver
This chapter includes the following sections:
WebLogic Server ships with the Oracle Thin Driver preconfigured and ready to use. If you want to update the driver or use a different version, see "Using API Extensions in JDBC Drivers" in Programming JDBC for Oracle WebLogic Server.
The following sections explain how to set the environment for the Oracle Thin/XA Driver.
For information on how to configure WebLogic Server for use with the Oracle Thin/XA Driver, see "Using API Extensions in JDBC Drivers" in Programming JDBC for Oracle WebLogic Server.
To prepare the database for XA, perform these steps:
Log on to sqlplus as system user, for example,
sqlplus sys/CHANGE_ON_INSTALL@<DATABASE ALIAS NAME>
Execute the following command:
xaview.sql script resides in the
All database users for which XA data sources are defined need to be granted the following permissions individually or through one or more roles:
grant select on v$xatrans$ to <user/role>;
grant select on pending_trans$ to <user/role>;
grant select on dba_2pc_pending to <user/role>;
grant select on dba_pending_transactions to <user/role>;
grant execute on dbms_xa to <user/role>;
<user/role> is either a data base user or a role.
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 a crash, recover for the Oracle resource faisl with
XAER_RMERR. Crash recovery is a standard operation for an XA resource.
For information on how to configure data source properties, see "Configuring JDBC Data Sources" in Configuring and Managing JDBC Data Sources for Oracle WebLogic Server.
To use other XA-compliant JDBC drivers, you must include the path to the driver class libraries in your
CLASSPATH and follow the configuration instructions provided by the vendor.
For information on how to configure WebLogic Server for use with WebLogic-branded Data Direct drivers, see "Using WebLogic-branded DataDirect Drivers" in Programming JDBC for Oracle WebLogic Server
Your data base vendor may provide instructions to perform steps to prepare your environment for XA. These steps may include how to:
Enable your data base server for XA. This may include granting additional user permissions.
Compensate for vendor-specific transactional behavior, such as threading, timeout, and rollback behavior.
Use vendor-specific connection properties.
Consult your data base vendor documentation for specific details.