PQ72451, 5.0: Prepared Statement not properly
closed
Downloadable files
Abstract
Prepared statement is not properly closed if duplicate
exists using WebSphere prepared statement cache feature
Download Description
USERS AFFECTED: WebSphere Application Server users of prepared statement
caching and prepare an SQL statement with the same SQL string more than
once in a single transaction, and do not close the prepared statement
between prepare API calls.
PROBLEM DESCRIPTION: WebSphere Users will notice that the application will
continue to function normally, however the JVM memory footprint may
continue to grow. If the customer then reviews a java heap dump, they will
notice a large number of objects awaiting finalization.
RECOMMENDATION: The SQL string is the key for the prepared statement
cache,
allowing only one of the duplicate prepared statements to be preserved in
the cache.
The references to others are dropped without invoking the JDBC driver
close method. This causes these statements to consume memory until JVM
garbage collection occurs.