openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r654631 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Date Thu, 08 May 2008 21:31:39 GMT
Author: fancy
Date: Thu May  8 14:31:31 2008
New Revision: 654631

URL: http://svn.apache.org/viewvc?rev=654631&view=rev
Log:
OPENJPA-574 DataCache entries not evicted when multiple OptimisticLockExceptions reported
from backend DB.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java?rev=654631&r1=654630&r2=654631&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Thu May  8 14:31:31 2008
@@ -241,9 +241,9 @@
                 break;
             case 0: // no row is inserted, treats it as failed
                 // case
-                if (failed != null || row.getAction() == Row.ACTION_UPDATE)
+                if (failed != null)
                     _exceptions.add(new OptimisticException(failed));
-                else
+                else if (row.getAction() == Row.ACTION_INSERT)
                     throw new SQLException(_loc.get(
                         "update-failed-no-failed-obj",
                         String.valueOf(count[i]), _batchedSql).getMessage());



Mime
View raw message