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 is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
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
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.