tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r708605 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Date Tue, 28 Oct 2008 16:41:36 GMT
Author: fhanik
Date: Tue Oct 28 09:41:36 2008
New Revision: 708605

URL: http://svn.apache.org/viewvc?rev=708605&view=rev
Log:
when the DB is down, don't wait and try over and over again, simply return the failure

Modified:
    tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=708605&r1=708604&r2=708605&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original)
+++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Tue
Oct 28 09:41:36 2008
@@ -477,8 +477,10 @@
                     }
                     return con;
                 } else {
+                    //validation failed.
                     release(con);
                     setToNull = true;
+                    throw new SQLException("Failed to validate a newly established connection.");
                 }
             } catch (Exception x) {
                 release(con);                
@@ -495,7 +497,6 @@
                 con = null;
             }
         }
-        return con;
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message