datasource.setPoolProperties(p);
}
protected void transferProperties() {
try {
BasicDataSourceFactory factory = new BasicDataSourceFactory();
Properties p = new Properties();
for (int i=0; i<this.ALL_PROPERTIES.length; i++) {
String name = "get" + Character.toUpperCase(ALL_PROPERTIES[i].charAt(0)) + ALL_PROPERTIES[i].substring(1);
String bname = "is" + name.substring(3);
Method get = null;
try {
get = PoolProperties.class.getMethod(name, new Class[0]);
}catch (NoSuchMethodException x) {
try {
get = PoolProperties.class.getMethod(bname, new Class[0]);
}catch (NoSuchMethodException x2) {
System.err.println(x2.getMessage());
}
}
if (get!=null) {
Object value = get.invoke(datasource.getPoolProperties(), new Object[0]);
if (value!=null) {
p.setProperty(ALL_PROPERTIES[i], value.toString());
}
}
}
tDatasource = (BasicDataSource)factory.createDataSource(p);
}catch (Exception x) {
x.printStackTrace();
}
}