You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org> on 2008/04/29 23:33:52 UTC
[jira] Closed: (CAY-1043) NPE in ConnectionWrapper on rollback
[ https://issues.apache.org/cayenne/browse/CAY-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik closed CAY-1043.
--------------------------------
Resolution: Fixed
> NPE in ConnectionWrapper on rollback
> ------------------------------------
>
> Key: CAY-1043
> URL: https://issues.apache.org/cayenne/browse/CAY-1043
> Project: Cayenne
> Issue Type: Bug
> Components: Cayenne Core Library
> Affects Versions: 3.0
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Priority: Minor
> Fix For: 3.0
>
> Attachments: CAY-1043.patch.txt
>
>
> Just noticed an NPE in Cayenne connection pool, ConnectionWrapper.rollback(), line 301. It is a result of a failed transaction that blew up inside "commit" method (most blow up on actual operation, so we rarely if ever see this condition). "commit" calls "close()" in a finally block, which results in ConnectionWrapper resetting the internal connection to NULL, causing NPE in a rollback call downstream... The real problem here of course is that calling "close" before "rollback" prevents correct state rollback and may result in unpredictable behavior in those rare situations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.