* @param datasource JDBC DataSource class name.
* @param props Properties to be used for the DataSource.
* @return JDO Datasource configuration.
*/
public static DataSource createDataSource(final String datasource, final Properties props) {
DataSource dsConf = new DataSource();
dsConf.setClassName(datasource);
Iterator iter = props.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
String key = (String) entry.getKey();
String value = (String) entry.getValue();
dsConf.addParam(createParam(key, value));
}
return dsConf;
}