List of usage examples for org.apache.commons.pool PoolUtils synchronizedPool
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool)
From source file:org.dspace.event.EventManager.java
private static void initPool() { if (dispatcherPool == null) { // TODO EVENT Some of these pool configuration // parameters can live in dspace.cfg or a // separate configuration file // TODO EVENT Eviction parameters should be set poolConfig = new GenericKeyedObjectPool.Config(); poolConfig.maxActive = 100;// w w w . j ava2 s . c om poolConfig.maxIdle = 5; poolConfig.maxTotal = 100; try { dispatcherFactory = new DispatcherPoolFactory(); dispatcherPool = PoolUtils .synchronizedPool(new GenericKeyedObjectPool(dispatcherFactory, poolConfig)); enumerateConsumers(); } catch (Exception e) { e.printStackTrace(); } } }