public class DBPoolFactory extends Object
| 构造器和说明 |
|---|
DBPoolFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
close(Connection c)
Close the connection in pool
|
static Connection |
getDbConnection(String poolname)
Get connection in pool
|
static String |
getPoolStats(String poolname)
Get Pool Status
|
static void |
shutdownPool()
Release Pool
|
static void |
startPool(String poolname,
String dbJdbc,
String dbUser,
String dbPwd,
int max,
long wait)
Start Pool
|
public static void startPool(String poolname, String dbJdbc, String dbUser, String dbPwd, int max, long wait)
poolname - the poolnamedbJdbc - the db jdbcdbUser - the db userdbPwd - the db pwdmax - the maxwait - the waitpublic static void shutdownPool()
public static String getPoolStats(String poolname)
poolname - the poolnamepublic static Connection getDbConnection(String poolname) throws SQLException
poolname - the poolnameSQLException - the sql exceptionpublic static void close(Connection c)
c - the cCopyright © 2016. All rights reserved.