Example usage for org.apache.commons.pool.impl GenericObjectPool.Config GenericObjectPool.Config

List of usage examples for org.apache.commons.pool.impl GenericObjectPool.Config GenericObjectPool.Config

Introduction

In this page you can find the example usage for org.apache.commons.pool.impl GenericObjectPool.Config GenericObjectPool.Config.

Prototype

GenericObjectPool.Config

Source Link

Usage

From source file:org.quickserver.net.server.impl.BasicPoolManager.java

protected GenericObjectPool.Config configurePool(PoolConfig opConfig) {
    GenericObjectPool.Config bconfig = new GenericObjectPool.Config();
    bconfig.maxActive = opConfig.getMaxActive();
    bconfig.maxIdle = opConfig.getMaxIdle();
    bconfig.testOnReturn = true;//from  w w  w  . jav a 2 s .c  o  m

    bconfig.timeBetweenEvictionRunsMillis = 1000 * 60 * 3;
    bconfig.minEvictableIdleTimeMillis = 1000 * 60 * 2;

    return bconfig;
}