[jira] Created: (CAY-1043) NPE in ConnectionWrapper on rollback

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Tue Apr 29 2008 - 10:09:52 EDT

  • Next message: Andrus Adamchik (JIRA): "[jira] Updated: (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.
    



    This archive was generated by hypermail 2.0.0 : Tue Apr 29 2008 - 10:13:44 EDT