Example usage for org.apache.commons.dbcp BasicDataSource setTimeBetweenEvictionRunsMillis

List of usage examples for org.apache.commons.dbcp BasicDataSource setTimeBetweenEvictionRunsMillis

Introduction

In this page you can find the example usage for org.apache.commons.dbcp BasicDataSource setTimeBetweenEvictionRunsMillis.

Prototype

public synchronized void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) 

Source Link

Document

Sets the #timeBetweenEvictionRunsMillis property.

Usage

From source file:uk.ac.ebi.sail.server.data.DataManager.java

private static DataSource setupDataSource(BackendConfigurationManager defaultCfg) {
    BasicDataSource ds = new BasicDataSource();

    ds.setDriverClassName(defaultCfg.getDBDriverClass());
    ds.setUsername(defaultCfg.getDBUserName());
    ds.setPassword(defaultCfg.getDBPassword());
    ds.setUrl(defaultCfg.getConnectionURL());

    ds.setTimeBetweenEvictionRunsMillis(10000);

    return ds;//from  w w  w . j  a  v a  2 s  . co  m
}