manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1657346 - /manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java
Date Wed, 04 Feb 2015 17:56:11 GMT
Author: kwright
Date: Wed Feb  4 17:56:10 2015
New Revision: 1657346

URL: http://svn.apache.org/r1657346
Log:
Handle connection-closed exceptions properly

Modified:
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java?rev=1657346&r1=1657345&r2=1657346&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java
Wed Feb  4 17:56:10 2015
@@ -620,6 +620,9 @@ public class DBInterfacePostgreSQL exten
     java.sql.SQLException sqlException = (java.sql.SQLException)e;
     String message = sqlException.getMessage();
     String sqlState = sqlException.getSQLState();
+    // If connection is closed, presume we are shutting down
+    if (sqlState != null && sqlState.equals("08003"))
+      return new ManifoldCFException(message,e,ManifoldCFException.INTERRUPTED);
     // Could not serialize
     if (sqlState != null && sqlState.equals("40001"))
       return new ManifoldCFException(message,e,ManifoldCFException.DATABASE_TRANSACTION_ABORT);



Mime
View raw message