Author: kwright
Date: Mon Jun  4 12:02:16 2012
New Revision: 1345930

URL: http://svn.apache.org/viewvc?rev=1345930&view=rev
Log:
Fix for CONNECTORS-478.  Don't treat presence of transaction as special in 
Derby.

Modified:
    incubator/lcf/trunk/CHANGES.txt
    
incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java

Modified: incubator/lcf/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1345930&r1=1345929&r2=1345930&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Mon Jun  4 12:02:16 2012
@@ -3,6 +3,11 @@ $Id$
 
 ======================= 0.6-dev =====================
 
+CONNECTORS-478: Catch event constraint-violation exception in Derby.
+This was not being interpreted as a retry situation because it is no
+longer inside a transaction.
+(Marcin Goss, Karl Wright)
+
 CONNECTORS-473: Split the ManifoldCF site into two distinct pieces.
 One is housed under "site/trunk" and contains the project site.  The other
 is housed under "trunk/site" and generates the release documentation.

Modified: 
incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java
URL: 
http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java?rev=1345930&r1=1345929&r2=1345930&view=diff
==============================================================================
--- 
incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java
 (original)
+++ 
incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceDerby.java
 Mon Jun  4 12:02:16 2012
@@ -804,7 +804,7 @@ public class DBInterfaceDerby extends Da
     // Note well: We also have to treat 'duplicate key' as a transaction 
abort, since this is what you get when two threads attempt to
     // insert the same row.  (Everything only works, then, as long as there is 
a unique constraint corresponding to every bad insert that
     // one could make.)
-    if (sqlState != null && sqlState.equals("23505") && inTransaction)
+    if (sqlState != null && sqlState.equals("23505"))
       return new 
ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);
     // Deadlock also aborts.
     if (sqlState != null && sqlState.equals("40001"))


Reply via email to