'dbcp'에 해당되는 글 1건

  1. 2009.04.28 DBCP] Without given validationQuery, no test.


If you do not give the query in validationQuery properties, validation(test) is not applied your application,
because dbcp code check the validationQuery.

Unconditionally TestOnBorrow, TestOnReturn in given properties also false.
package org.apache.commons.dbcp;
public class BasicDataSource implements DataSource {
        // Can't test without a validationQuery
        if (validationQuery == null) {
            setTestOnBorrow(false);
            setTestOnReturn(false);
            setTestWhileIdle(false);
        }

Posted by 김용환 '김용환'