轻量级JDBC数据库连接池 - MiniConnectionPoolManager

jopen 12年前

MiniConnectionPoolManager是一个轻量级JDBC数据库连接池器。可用在Java servlet或桌面应用程序中。它只需要Java1.5(或更高)并且没有依赖第三方包。

For Oracle (example for Thin driver):    oracle.jdbc.pool.OracleConnectionPoolDataSource dataSource = new oracle.jdbc.pool.OracleConnectionPoolDataSource();  dataSource.setDriverType ("thin");  dataSource.setServerName ("server1.yourdomain.com");  dataSource.setPortNumber (1521);  dataSource.setServiceName ("db1.yourdomain.com");  dataSource.setUser ("system");  dataSource.setPassword ("sesame");  MiniConnectionPoolManager poolMgr = new MiniConnectionPoolManager(dataSource, maxConnections);  ...  Connection connection = poolMgr.getConnection();  ...  connection.close();

项目主页:http://www.open-open.com/lib/view/home/1350379506586