* @param theMap additional persistence context parameters
* @return a new data source, or null if one cannot be created.
* @throws com.clarkparsia.empire.ds.DataSourceException if there is an error while creating the data source
*/
public DataSource createDataSource(final String theUnitName, final Map theMap) throws DataSourceException {
DataSourceFactory aFactory = selectFactory(theUnitName, theMap);
if (aFactory != null) {
return aFactory.create(createUnitConfig(theUnitName, theMap));
}
else {
return null;
}
}