jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r511478 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
Date Sun, 25 Feb 2007 10:44:31 GMT
Author: jukka
Date: Sun Feb 25 02:44:30 2007
New Revision: 511478

URL: http://svn.apache.org/viewvc?view=rev&rev=511478
Log:
JCR-765: Ignore statement close exceptions during connection re-establishment

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java?view=diff&rev=511478&r1=511477&r2=511478
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
Sun Feb 25 02:44:30 2007
@@ -92,7 +92,7 @@
     protected Connection con;
 
     // internal flag governing whether an automatic reconnect should be
-    // attempted after a SQLException had been encountered    
+    // attempted after a SQLException had been encountered
     protected boolean autoReconnect = true;
     // time to sleep in ms before a reconnect is attempted
     protected static final int SLEEP_BEFORE_RECONNECT = 10000;
@@ -778,7 +778,14 @@
 
         // close shared prepared statements
         for (Iterator it = preparedStatements.values().iterator(); it.hasNext(); ) {
-            closeStatement((PreparedStatement) it.next());
+            PreparedStatement stmt = ((PreparedStatement) it.next());
+            if (stmt != null) {
+                try {
+                    stmt.close();
+                } catch (SQLException se) {
+                    // ignored, see JCR-765
+                }
+            }
         }
         try {
             closeConnection(con);



Mime
View raw message