}
buffer.setProvider(ds);
// temporary stop notification => can remove and add safely
setNotify(false);
if (sources.remove(ds)) { // true if it was present
DataSource ret = new BufferedDataSource(buffer);
sources.add(ret);
// reactivate notification and send a 'change' message
setNotify(true);
notifyListeners(DataSourcePoolEvent.CHANGE, ret, ds);
return ret;