in src/main/java/org/apache/sling/datasource/internal/DataSourceFactory.java [248:270]
private PoolConfiguration createPoolConfig(Map<String, ?> config) {
Properties props = new Properties();
//Copy the other properties first
Map<String, String> otherProps = PropertiesUtil.toMap(config.get(PROP_DATASOURCE_SVC_PROPS), new String[0]);
for (Map.Entry<String, String> e : otherProps.entrySet()) {
set(e.getKey(), e.getValue(), props);
}
props.setProperty(org.apache.tomcat.jdbc.pool.DataSourceFactory.OBJECT_NAME, name);
for (String propName : DummyDataSourceFactory.getPropertyNames()) {
String value = PropertiesUtil.toString(config.get(propName), null);
set(propName, value, props);
}
//Specify the DataSource such that connection creation logic is handled
//by us where we take care of OSGi env
PoolConfiguration poolProperties = org.apache.tomcat.jdbc.pool.DataSourceFactory.parsePoolProperties(props);
poolProperties.setDataSource(createDriverDataSource(poolProperties));
return poolProperties;
}