public class C3P0Utils {
private static ComboPooledDataSource ds = new ComboPooledDataSource();
// 1 获取连接
public static Connection getConnection() throws SQLException {
return ds.getConnection();
}
// 2 获取连接池 将来给jdbc工具类用: 如 dbutils
public static DataSource getDataSource() {
return ds;
}
}