[
https://issues.apache.org/cayenne/browse/CAY-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrus Adamchik updated CAY-1043:
---------------------------------
Attachment: CAY-1043.patch.txt
attaching patch to Jira. Will commit once Apache SVN is back online. Would also
be nice to add null checks to ConnectionWrapper for better error reporting....
> 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.