} //end if
//make sure the pool is properly configured
+ if (properties.getMaxActive()<1) {
+ log.warn("maxActive is smaller than 1, setting maxActive to: "+PoolProperties.DEFAULT_MAX_ACTIVE);
+ properties.setMaxActive(PoolProperties.DEFAULT_MAX_ACTIVE);
+ }
if (properties.getMaxActive()<properties.getInitialSize()) {
log.warn("initialSize is larger than maxActive, setting initialSize to: "+properties.getMaxActive());
properties.setInitialSize(properties.getMaxActive());
public class PoolProperties implements PoolConfiguration {
private static final Log log = LogFactory.getLog(PoolProperties.class);
+ public static final int DEFAULT_MAX_ACTIVE = 100;
+
protected static AtomicInteger poolCounter = new AtomicInteger(0);
protected Properties dbProperties = new Properties();
protected String url = null;
protected String defaultCatalog = null;
protected String connectionProperties;
protected int initialSize = 10;
- protected int maxActive = 100;
+ protected int maxActive = DEFAULT_MAX_ACTIVE;
protected int maxIdle = maxActive;
protected int minIdle = initialSize;
protected int maxWait = 30000;