Search in sources :

Example 1 with ClusterDataSource

use of com.ctrip.platform.dal.dao.datasource.cluster.ClusterDataSource in project dal by ctripcorp.

the class ClusterDynamicDataSource method createMultiHostDataSource.

protected DataSource createMultiHostDataSource() {
    if (cluster.dbShardingEnabled())
        throw new UnsupportedFeatureException("ClusterDataSource does not support sharding cluster, cluster name: " + cluster.getClusterName());
    DataSourceIdentity id = getMultiHostDataSourceIdentity(cluster);
    dataSourceId = id;
    return new ClusterDataSource(id, cluster, provider);
}
Also used : ClusterDataSource(com.ctrip.platform.dal.dao.datasource.cluster.ClusterDataSource) UnsupportedFeatureException(com.ctrip.platform.dal.exceptions.UnsupportedFeatureException)

Aggregations

ClusterDataSource (com.ctrip.platform.dal.dao.datasource.cluster.ClusterDataSource)1 UnsupportedFeatureException (com.ctrip.platform.dal.exceptions.UnsupportedFeatureException)1