List of usage examples for org.apache.commons.pool2.impl GenericObjectPoolConfig getJmxNamePrefix
public String getJmxNamePrefix()
From source file:JDBCPool.dbcp.demo.sourcecode.GenericObjectPool.java
/** * Create a new <code>GenericObjectPool</code> using a specific * configuration.//from w ww . j ava 2s . c o m * * @param factory The object factory to be used to create object instances * used by this pool * @param config The configuration to use for this pool instance. The * configuration is used by value. Subsequent changes to * the configuration object will not be reflected in the * pool. */ public GenericObjectPool(PooledObjectFactory<T> factory, GenericObjectPoolConfig config) { super(config, ONAME_BASE, config.getJmxNamePrefix()); if (factory == null) { jmxUnregister(); // tidy up throw new IllegalArgumentException("factory may not be null"); } this.factory = factory; idleObjects = new LinkedBlockingDeque<PooledObject<T>>(config.getFairness()); setConfig(config); startEvictor(getTimeBetweenEvictionRunsMillis()); }