svn commit: r783880 - /jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
[email protected] Thu, 11 Jun 2009 19:36:46 -0000
| Newsgroups | gmane.comp.jakarta.turbine.jcs.devel |
|---|---|
| Message-ID | <[email protected]> |
Author: asmuts
Date: Thu Jun 11 19:36:45 2009
New Revision: 783880
URL: http://svn.apache.org/viewvc?rev=783880&view=rev
Log:
added new strings to the exists check on the jdbc disk cache. we should make this configurable.
Modified:
jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java?rev=783880&r1=783879&r2=783880&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java Thu Jun 11 19:36:45 2009
@@ -355,8 +355,9 @@
catch ( SQLException e )
{
if ( e.toString().indexOf( "Violation of unique index" ) != -1
- || e.getMessage().indexOf( "Violation of unique index" ) != -1
- || e.getMessage().indexOf( "Duplicate entry" ) != -1 )
+ || e.getMessage().indexOf( "Duplicate entry" ) != -1
+ || e.getMessage().indexOf( "duplicate key" ) != -1
+ || e.getMessage().indexOf( "primary key constraint" ) != -1 )
{
exists = true;
}