pluginInfo.getParameters().put("connectionBusyTimeout", "10000");
pluginInfo.getParameters().put("maxWaitingThreads", "" + maxWaitingThreads);
pluginInfo.getParameters().put("connectionPoolSize", "" + numConn);
JdbcConnectionPool pool = new JdbcConnectionPool();
pool.initialize(ownGlobal, pluginInfo.getParameters());
Connection[] conn = new Connection[numConn];
for (int i=0; i < numConn; i++) {
log.info(" getting connection " + i);
conn[i] = pool.getConnection();
assertNotNull("The connection " + i + " shall not be null", conn[i]);
}
log.info(" getting extra connection");
Connection extraConn = null;
try {
extraConn = pool.getConnection();
assertTrue("An Exception should have occured here: ", false);
}
catch (Exception ex) {
}
// should wait 10 seconds and then return null
assertNull("the extra connection should be null", extraConn);
boolean success = true;
pool.releaseConnection(conn[0], success);
extraConn = pool.getConnection();
assertNotNull("the extra connection should not be null", extraConn);
//pool.releaseConnection(extraConn);
this.exceptionCount = 0;
int expectedEx = 4;