可以配2个不同的数据库, 速度还可以
10000000次8秒种
[文件] 支持双数据库的DB连接池.rar ~ 146KB 下载
[Java]代码
public class text
{
public static void main(String[] args) throws SQLException
{
long start2 = System.currentTimeMillis();
Connection conn = null;
for(int i = 1; i < 10000000; i++)
{
conn = DB.getConn(1);
conn.close();
}
System.out.println("经过10000000次的循环调用,使用连接池花费的时间" + (System.currentTimeMillis() - start2) + "ms\n");
}
}

[图片] 程序演示.gif





