//一个连接的最大使用次数
private int maxUseCount;
//一个连接的最大空闲时间
private long maxTimeout;
//同一时间的Connection最大使用个数
private int maxConns;
//定时器
private Timer timer;
public boolean init()
{
try
{
……
this.poolConns = new PoolConn[this.min];
for(int i=0;i<this.min;i++)
{
PoolConn poolConn = new PoolConn();
poolConn.conn = ConnectionManager.getConnection();
poolConn.isUse = false;
poolConn.lastAccess = new Date().getTime();
poolConn.useCount = 0;
this.poolConns[i] = poolConn;
}
……
return true;
}
catch(Exception e)
{
return false;
}
}
……