PQ77695: UNABLE TO ACCESS LOCKED ROW WHEN READ_UNCOMMITTED ISOLATION LEVEL IS USED FOR INFORMIX DATABASE IN WEBSPHERE APP SERVER 5.0

APAR status
Closed as program error.

Error description
A legacy application locks a row in an Informix database.  An
ejb method with a READ_UNCOMMITTED isolation level running in
WebSphere 5.0.x tries to access the row and the following
exception is thrown:
java.sql.SQLException: Could not do an indexed read to get the
next row.
 at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:2996)
 at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3310)
...
----- Begin backtrace for next
java.sql.SQLException: ISAM error: record is locked.
 at
com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:348)
 at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3000)
...
following scenario that will break isolation level tracking when
Informix is used:
  Connection is requested for isolation level A
  Isolation level is changed to B
  Connection is returned to the pool (for Informix, the
scrubConnection method is invoked)
  Connection is requested for isolation level B
  Connection Manager returns same connection from the pool
  Application calls getTransactionIsolation, which reports B,
the value last tracked by Adapter
  Application uses the connection thinking the isolation level
is B, but it is really
    some other value--whatever Informix's default value is that
scrubConnection reset it to.
Local fix Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 5.0 users of    *
*                 Informix DataSources.                        *
****************************************************************
* PROBLEM DESCRIPTION: Informix connections may cause a        *
*                      deadlock, due to the wrong Isolation    *
*                      Level being used.                       *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
The Isolation Level for Informix connections is being reset
each time an Informix connection is returned from the
WebSphere Application Server's Connection Pool.
This can result in a connection attaining "stronger" locks
than what the application expected, which can cause a deadlock.
Other properties on the connection were also reset, including
AutoCommit.  This APAR also addresses that issue.
Problem conclusion
The root cause of the problem was that the WebSphere
Application Server JDBC Connection Manager was calling
scrubConnection() for Informix connections each time one was
retrieved from the pool.
ScrubConnection() was resetting all the properties of the
connection, including Isolation Level, and autoCommit.
The solution to the problem was to remove the call to
scrubConnection.
Temporary fix Comments
APAR information
APAR number PQ77695
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00W
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2003-08-21
Closed date 2003-09-12
Last modified date 2006-02-07

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
RRA          

Publications Referenced

Fix information

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00P PSY    UP
R00S PSY    UP
R00W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ77695
IBM Group: Software Group
Modified date: Feb 7, 2006