{@link CobarDataSourceDescriptor} describe a data base deployment structurewith 2 databases as HA group.
it looks like:
Client /\ / \ Active DB <-> Standby DB
{@link #targetDataSource} should be the reference to the current activedatabase, while {@link #standbyDataSource} should be the standby database.
for both {@link #targetDataSource} and {@link #standbyDataSource}, each one should have a sibling data source that connect to the same target database.
as to the reason why do so, that's :
- these sibling DataSources will be used when do database-status-detecting.(if we fetch connection from target data source, when it's full, the deteting behavior can't be performed.)
- if the {@link #targetDataSource} and {@link #standbyDataSource} areDataSource implementations configured in local application container, we can fetch necessary information via reflection to create connection to target database independently, but if they are fetched from JNDI, we can't, so explicitly declaring sibling data sources is necessary in this situation.
@author fujohnwang
@since 1.0