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

How are prefixed dynamic DataSources pooled

$
0
0
Documentation referenced in this post: http://www.smartclient.com/docs/9.1/...Implementation

and http://www.smartclient.com/docs/9.1/...a.lang.String)

We would like to create a dynamic data source generator that will return a different DataSource based on a postfix of the ID that is used.

For instance:

Code:

DataSource.addDynamicDataSource(ddsg1, "dds_1");
DataSource.addDynamicDataSource(ddsg2, "dds_2");

In this example, the datasource generator would always return a DataSource with one set of fields for ID "dds_1", and a different DS with a different set of fields for ID "dds_2."

Would these two data sources be pooled separately when "poolDynamicDataSources = true", such that when I run RPCManager.getDataSource("dds_1") I will always get a "dds_1" and never a "dds_2"?

The alternative, as I understand it, is to leave dynamic pooling disabled and just register a single generator with prefix "dds_" and let it return a different DataSource by parsing out the postfix.

For example:
Code:

DataSource.addDynamicDataSource(ddsg, "dds_");

Viewing all articles
Browse latest Browse all 4756

Trending Articles