commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Jakarta Commons Wiki] Updated: DBCP
Date Thu, 19 Aug 2004 14:23:05 GMT
   Date: 2004-08-19T07:23:05
   Editor: DieterLeber <>
   Wiki: Jakarta Commons Wiki
   Page: DBCP

   no comment

Change Log:

@@ -89,3 +89,13 @@
 A: They were replaced:
+Q: Without using validation of connections (testOnBorrow = false, testOnReturn = false, timeBetweenEvictionRunsMillis
= -1) and after shutdown and restarting the database again, it looks like the pool is cleaning
its old connections by itself. So it turns out that we always have valid connections. How
can you explain this and when is explicit validation necessary?
+A: During the connection activation (when borrowing a connection) the setAutoCommit and other
connection init methods are called. If one of these methods throws a SQLException then the
connection is also considered broken and removed from the pool.
+So if you are using one of the "default*" properties and the JDBC driver correctly reports
the SQLExceptions on the "set*" methods then you don't need an extra validationQuery.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message