in src/java/org/apache/fulcrum/pool/DefaultPoolService.java [374:407]
public void configure(Configuration conf)
{
final Configuration capacities = conf.getChild(POOL_CAPACITY, false);
if (capacities != null)
{
Configuration defaultConf = capacities.getChild("default");
int capacity = defaultConf.getValueAsInteger(DEFAULT_POOL_CAPACITY);
if (capacity <= 0)
{
throw new IllegalArgumentException("Capacity must be >0");
}
poolCapacity = capacity;
Configuration[] nameVal = capacities.getChildren();
for (int i = 0; i < nameVal.length; i++)
{
String key = nameVal[i].getName();
if (!"default".equals(key))
{
capacity = nameVal[i].getValueAsInteger(poolCapacity);
if (capacity < 0)
{
capacity = poolCapacity;
}
if (capacityMap == null)
{
capacityMap = new HashMap<String, Integer>();
}
capacityMap.put(key, capacity);
}
}
}
}