datasource = (DataSourceComponent)selector.select(this.datasourceName);
} catch (Exception e) {
String msg = "Cannot get datasource '" + this.datasourceName + "'";
getLogger().error(msg);
throw new SourceException(msg, e);
}
try {
return datasource.getConnection();
} catch (Exception e) {
String msg = "Cannot get connection for datasource '" + this .datasourceName + "'";
getLogger().error(msg);
throw new SourceException(msg, e);
}
} finally {
if (datasource != null) {
selector.release(datasource);