Setting the correct value for AutoCommit in the Connection of the OracleXADataSource
 Technote (troubleshooting)
 
Problem(Abstract)
When using an XA-enabled Oracle data source in IBM® WebSphere® Application Server V5.0 or V6.0, the default value for AutoCommit on a connection obtained from the data source is false. This is different from a non-XA Oracle data source where the default value for AutoCommit is true.

This can cause the following errors to occur when running a servlet:
WLTC0033E: Resource jdbc/oraclexads rolled back in cleanup of unresolved LocalTransactionContainment.
WLTC0032E: One or more resources rolled back. An unresolved LocalTransactionContainment had an unresolved action of rollback.
 
Cause
Oracle Bug #2618770 was accepted by Oracle for this problem.
 
Resolving the problem
Oracle has fixed the bug #2618770 in Oracle 9.2.0.6 and 10g JDBC™ drivers. With these versions of the JDBC driver, the default value for AutoCommit for an XA-enabled data source is true. The value of AutoCommit still defaults to false for an XA-enabled Oracle data source with the Oracle 9.2.0.5 (or lower) JDBC driver.

If you still need to use the Oracle 9.2.0.5 (or lower) JDBC driver), set the AutoCommit value to true after the connection is obtained from the OracleXADatasource, using the setAutoCommit method.

If your application runs in a global transaction, set the AutoCommit value to false when starting the global transaction.

Note: Information about the Oracle bug can also be found in WebSphere Application Server V5.0.1 Release Notes.

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 6.0.2.3
Software edition:
Reference #: 1113363
IBM Group: Software Group
Modified date: Nov 18, 2005