setAutoCommit() on connection obtained from a XA data source in WebSphere Application Server throws an exception
 Technote (FAQ)
 
Problem
SetAutoCommit() on a connection obtained from a XA Data Source in WebSphere® Application Server returns an exception. An example exception for Oracle is:
java.sql.SQLException: Use explicit XA call. For DB2® an example exception is: CLI0126E Operation invalid at this time.
 
Cause
The application gets the connection from a XA data source, the method setAutoCommit() on the connection can be set if only one resource is involved in the transaction. However, if more than one resource is involved in the transaction, it is not permitted. The JDBC™ drivers may give an exception when autocommit is set on the connection.
 
Solution
Add an explicit commit() to the application code.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1170234
IBM Group: Software Group
Modified date: May 27, 2004