factory.setConfigProperty(entry.getKey().substring("property-".length()),
entry.getValue());
}
}
//todo: push the lookup into ManagementHelper
PoolingAttributes pool = (PoolingAttributes) factory.getConnectionManagerContainer();
pool.setPartitionMinSize(
data.minSize == null || data.minSize.equals("") ? 0 : Integer.parseInt(data.minSize));
pool.setPartitionMaxSize(
data.maxSize == null || data.maxSize.equals("") ? 10 : Integer.parseInt(data.maxSize));
pool.setBlockingTimeoutMilliseconds(
data.blockingTimeout == null || data.blockingTimeout.equals("") ? 5000 : Integer.parseInt(
data.blockingTimeout));
pool.setIdleTimeoutMinutes(
data.idleTimeout == null || data.idleTimeout.equals("") ? 15 : Integer.parseInt(
data.idleTimeout));
} catch (Exception e) {
log.error("Unable to save connection pool", e);
}