jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Pruessmann (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCR-3148) Using transactions still leads to memory leak
Date Tue, 15 Nov 2011 11:40:51 GMT
Using transactions still leads to memory leak

                 Key: JCR-3148
                 URL: https://issues.apache.org/jira/browse/JCR-3148
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: transactions
    Affects Versions: 2.2.5
            Reporter: Boris Pruessmann

This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that
txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback().
However, in both methods an exception could be thrown either as a result of calling tx.commit()
(or tx.prepare()) and tx.rollback(). 

As a result, the transaction will not be removed from txGlobals whenever the commit or the
rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid)
into a finally block.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message