cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r652156 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ExternalTransaction.java
Date Tue, 29 Apr 2008 21:36:43 GMT
Author: aadamchik
Date: Tue Apr 29 14:36:43 2008
New Revision: 652156

URL: http://svn.apache.org/viewvc?rev=652156&view=rev
Log:
CAY-1043 NPE in ConnectionWrapper on rollback

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ExternalTransaction.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=652156&r1=652155&r2=652156&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Tue Apr 29 14:36:43 2008
@@ -53,6 +53,7 @@
 CAY-1018 Enums fetched via SQLTemplate
 CAY-1020 Problem accessing toMany Set relationships on client.
 CAY-1028 NPE's in the Modeler for incomplete relationships
+CAY-1043 NPE in ConnectionWrapper on rollback
 
 ----------------------------------
 Release: 3.0M3

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ExternalTransaction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ExternalTransaction.java?rev=652156&r1=652155&r2=652156&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ExternalTransaction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ExternalTransaction.java
Tue Apr 29 14:36:43 2008
@@ -79,32 +79,31 @@
 
     @Override
     public void commit() throws IllegalStateException, SQLException, CayenneException {
-        try {
-            if (status == Transaction.STATUS_NO_TRANSACTION) {
-                return;
-            }
-
-            if (delegate != null && !delegate.willCommit(this)) {
-                return;
-            }
 
-            if (status != Transaction.STATUS_ACTIVE) {
-                throw new IllegalStateException(
-                        "Transaction must have 'STATUS_ACTIVE' to be committed. "
-                                + "Current status: "
-                                + Transaction.decodeStatus(status));
-            }
+        if (status == Transaction.STATUS_NO_TRANSACTION) {
+            return;
+        }
 
-            processCommit();
+        if (delegate != null && !delegate.willCommit(this)) {
+            return;
+        }
 
-            status = Transaction.STATUS_COMMITTED;
-            if (delegate != null) {
-                delegate.didCommit(this);
-            }
+        if (status != Transaction.STATUS_ACTIVE) {
+            throw new IllegalStateException(
+                    "Transaction must have 'STATUS_ACTIVE' to be committed. "
+                            + "Current status: "
+                            + Transaction.decodeStatus(status));
         }
-        finally {
-            close();
+
+        processCommit();
+
+        status = Transaction.STATUS_COMMITTED;
+
+        if (delegate != null) {
+            delegate.didCommit(this);
         }
+
+        close();
     }
 
     @Override



Mime
View raw message