List of usage examples for org.apache.commons.pool2.impl GenericObjectPoolConfig setJmxEnabled
public void setJmxEnabled(boolean jmxEnabled)
From source file:stroom.statistics.server.sql.SQLStatisticEventStore.java
private GenericObjectPoolConfig getObjectPoolConfig() { final GenericObjectPoolConfig config = new GenericObjectPoolConfig(); // Max number of idle items .... same as our pool size config.setMaxIdle(poolSize);//from w w w.j a va 2s . c om // Pool size config.setMaxTotal(poolSize); // Returns the minimum amount of time an object may sit idle in the pool // before it is eligible for eviction by the idle object evictor // Here if it is idle for 10 min's it will simply return It will also // return by validateObject if it is simple more than 10min old config.setMinEvictableIdleTimeMillis(poolAgeMsThreshold); // Check for idle objects never .... we will do this with task sytstem config.setTimeBetweenEvictionRunsMillis(0); // Must cause other threads to block to wait for a object config.setBlockWhenExhausted(true); config.setJmxEnabled(false); // Check item on just before returning to pool config.setTestOnReturn(true); return config; }