bitronix/btm — pull request #28 by rankinc (2014-05-25 20:48:16+00:00)
Title: Cache leak fix

Put actual PreparedStatement objects in the LruStatementCache, instead of BTM-generated proxies. This fixes a memory leak where LruEvictionListener cannot close a statement when it is evicted from the cache.

Also, proxies retrieved from the cache for reuse had their "pretendClosed" field set to "true", meaning that an apparently newly-minted PreparedStatement satified isClosed() == true.

PreparedStatements were also being cached in a "dirty" state, with batches and warnings from their previous use still attached.