Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

get all available DataSource names??

$
0
0
Is there a way to get all available DataSource names from within a servlet?

For example, in my DataSourceLoader servlet I want to iterate all known DataSources and inspect their config. Something like ...

DataSourceManager.getDataSourceNames();

So far, I can do this...

String[] names = new String[] { "foo", "bar" };
for (String n : names) {
DataSource ds = DataSourceManager.get(n);
Object o = ds.getConfig().get("requiresRole");
// etc.
}

I'd like to do this...

List<String> names = DataSourceManager.getDataSourceNames();
for (String n : names) {
DataSource ds = DataSourceManager.get(n);
Object o = ds.getConfig().get("requiresRole");
// etc.
}

SmartClient version: v9.0p_2013-07-11EVAL

Thanks,
Chris

Viewing all articles
Browse latest Browse all 4756

Trending Articles