shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/datasource/ShardingSphereDataSource.java
/**
     * Close data sources.
     *
     * @param dataSourceNames data source names to be closed
     * @throws Exception exception
     */
Close data sources.
@param dataSourceNames data source names to be closed
@throws Exception exception
Close data sources . @param dataSourceNames data source names to be closed @throws Exception exception
public void close(final Collection<String> dataSourceNames) throws Exception {
        Map<String, DataSource> dataSourceMap = getDataSourceMap();
        for (String each : dataSourceNames) {
            close(dataSourceMap.get(each));
        }
        contextManager.close();
    }
public void close ( final Collection < String > dataSourceNames ) throws Exception { Map < String , DataSource > dataSourceMap = getDataSourceMap ( ) ; for ( String each : dataSourceNames ) { close ( dataSourceMap . get ( each ) ) ; } contextManager . close ( ) ; }
Close data sources.
Close data sources .