Author: fhanik Date: Tue Oct 28 07:36:30 2008 New Revision: 708587 URL: http://svn.apache.org/viewvc?rev=708587&view=rev Log: throw an exception instead of timeout when we fail to reconnect
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=708587&r1=708586&r2=708587&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 07:36:30 2008 @@ -441,7 +441,7 @@ return null; } - protected PooledConnection borrowConnection(long now, PooledConnection con) { + protected PooledConnection borrowConnection(long now, PooledConnection con) throws SQLException { //we have a connection, lets set it up boolean setToNull = false; try { @@ -483,6 +483,11 @@ } catch (Exception x) { release(con); setToNull = true; + if (x instanceof SQLException) { + throw (SQLException)x; + } else { + throw new SQLException(x); + } } } finally { con.unlock(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]