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 16:09:52 UTC
[jira] Created: (CAY-1043) NPE in ConnectionWrapper on rollback
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
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.
[jira] Closed: (CAY-1043) NPE in ConnectionWrapper on rollback
Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
[ 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.
[jira] Updated: (CAY-1043) NPE in ConnectionWrapper on rollback
Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
[ 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.