com.jquicker.persistent.rdb.ds.DatasourcePool Maven / Gradle / Ivy
package com.jquicker.persistent.rdb.ds;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
/**
* 多数据源支持
* @author OL
*
*/
public class DatasourcePool {
static final String DEFAULT_KEY = "main-connection";
/**
* key:数据源名称
*/
Map container = new HashMap();
public DataSource getDataSource() {
return container.get(DEFAULT_KEY);
}
public DataSource getDataSource(String key) {
return container.get(key);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy