PQ48412: CURSOR REMAINS OPEN WHEN USING PREPARESTATEMENT WITH WAS DATASOURCE

A fix is available
3.5.4-3.5.7, 4.0.2-4.0.7: Component cumulative Connection Manager fix

APAR

APAR status
Closed as program error.

Error description
Environment: Oracle JDBC Thin 8.1.6/8.1.7 driver with
WAS 3.5.2 + EFIX PQ47404.
Problem: Application uses prepareStatement object with WAS
datasource to do some query. The application closes all the
statements, resultsets and connection objects. When they
query the Oracle's table V$OPEN_CURSOR, they still see the
cursor open.
.
The problem is reproduced with WAS 3.5.2 or WAS 3.5.3 with
efix PQ47404.
.
I had tried setting the Oracle's initialization parameter
_CLOSE_CACHED_OPEN_CURSORS = true
in the Oracle 8.1.6 database but it didn't help.
Local fix
Problem summary
StatementCache is allowing one statement to be
cached, even when maximum size for the cache is
set to zero.
Problem conclusion
Caching statements when maximum cache size is 0 will be fixed
by adding a check to the CacheManager.addStatement function to
see if maximum pool size is 0.  If so, the add is ignored and
the statement gets closed.  In the future, we should add code
to avoid using the prepared statement cache completely when
maximum pool size is 0.
.
ConnectionPool is also being updated so that it cycles through
free connections for a user instead of always allocating the
most recently used one.  This should at least delay the problem
for Oracle by distributing it across multiple statements.
.
Closing prepared statements that are not added to the cache willcurrently be done in the releaseStatement/releaseStatements
methods of StatementCache.  After attempting to add to the
cache, any prepared statements we are unable to add will be
closed.
.
Code was changed in:
com/ibm/ejs/cm/cache/CacheManager.java
com/ibm/ejs/cm/cache/StatementCache.java
com/ibm/ejs/cm/pool/ConnectionPool.java
Code was changed in:com/ibm/ejs/cm/cache/CacheManager.javacom/ibm/ejs/cm/cache/StatementCache.javacom/ibm/ejs/cm/pool/ConnectionPool.java
Temporary fix
Comments
APAR information
APAR numberPQ48412
Reported component nameWAS ADVANCED AI
Reported component ID5648C8400
Reported release350
StatusCLOSED PER
PENoPE
HIPERNoHIPER
Submitted date2001-05-02
Closed date2001-05-23
Last modified date2002-05-15

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:APAR is sysrouted FROM one or more of the following:


Modules/Macros
EJS
APAR is sysrouted TO one or more of the following:Modules/Macros

Fix information
Fixed component nameWAS ADVANCED AI
Fixed component ID5648C8400

Applicable component levels
R350 PSYUP











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, General
Software version: 350
Reference #: PQ48412
IBM Group: Software Group
Modified date: 2002-05-15