commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp BasicDataSource.java
Date Wed, 27 Aug 2003 15:43:55 GMT
dirkv       2003/08/27 08:43:55

  Modified:    dbcp/src/java/org/apache/commons/dbcp BasicDataSource.java
  Log:
  Bugzilla Bug 22750: BasicDataSource always sets testOnBorrow if given a validation query
  Only enable TestOnBorrow when testOnReturn  & testWhileIdle are not set
  
  - patch from Juergen Hoeller
  
  Revision  Changes    Path
  1.23      +4 -4      jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java
  
  Index: BasicDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- BasicDataSource.java	26 Aug 2003 14:19:28 -0000	1.22
  +++ BasicDataSource.java	27 Aug 2003 15:43:55 -0000	1.23
  @@ -732,7 +732,7 @@
           connectionPool.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
           connectionPool.setTestWhileIdle(testWhileIdle);
           
  -        if (validationQuery != null) {
  +        if (validationQuery != null && !testOnReturn && !testWhileIdle)
{
               connectionPool.setTestOnBorrow(true);
           }
   
  
  
  

Mime
View raw message