public DataSource getDataSource() {
return dataSource;
}
private BasicDataSource newDbcpConfiguration(Map map) {
BasicDataSource basicDataSource = new BasicDataSource();
Iterator props = map.keySet().iterator();
while (props.hasNext()) {
String propertyName = (String) props.next();
if (propertyName.startsWith(ADD_DRIVER_PROPS_PREFIX)) {
String value = (String) map.get(propertyName);
basicDataSource.addConnectionProperty(propertyName.substring(ADD_DRIVER_PROPS_PREFIX_LENGTH), value);
} else if (PROBE.hasWritableProperty(basicDataSource, propertyName)) {
String value = (String) map.get(propertyName);
Object convertedValue = convertValue(basicDataSource, propertyName, value);
PROBE.setObject(basicDataSource, propertyName, convertedValue);
}