Atomikos Forum

AtomikosThreadLocalConnection statement leak 3.9.3

Same issue as default82df.html?community.6.2742.0

However the bug has not yet been resolved in 3.9.3 (while the issue above is 3.7.0). The issue revolves around AtomikosThreadLocalConnection caching all statements triggered but not releasing them on connection close or removing statements from the list on statement close (actually not even an option on the object AbstractConnectionProxy besides the force option).

As the only reason the list is maintained is to make sure the statements will be closed, it seems weird that the AtomikosThreadLocalConnection doesn't actually trigger a close.

Currently using two options to resolve the leak:

private void resetForNextTransaction()

And wrapped all Statement that are added with addStatement(Statement s) in a proxy that triggers the following method on all close() methods.

    public synchronized void removeStatement(Statement s) {

Which makes sure the list will be as short as possible and generally empty on resetForNextTransaction.
Tony Zuur Send private email
Friday, September 19, 2014

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics