com.jquicker.persistent.rdb.ds.ConnectionPool Maven / Gradle / Ivy
package com.jquicker.persistent.rdb.ds;
import java.sql.Connection;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
public class ConnectionPool {
static final String DEFAULT_KEY = "main-connection";
DataSource dataSource;
/**
* key: 连接名称(创建者标识)
* value: 连接
*/
Map container = new HashMap();
public Connection getConnection() {
return container.get(DEFAULT_KEY);
}
public Connection getConnection(String key) {
return container.get(key);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy