if (pool == null) {
pool = new QueuedThreadPool();
aconn.setThreadPool(pool);
}
if (pool instanceof OldQueuedThreadPool) {
OldQueuedThreadPool pl = (OldQueuedThreadPool)pool;
if (getThreadingParameters().isSetMinThreads()) {
pl.setMinThreads(getThreadingParameters().getMinThreads());
}
if (getThreadingParameters().isSetMaxThreads()) {
pl.setMaxThreads(getThreadingParameters().getMaxThreads());
}
} else if (pool instanceof QueuedThreadPool) {
QueuedThreadPool pl = (QueuedThreadPool)pool;
if (getThreadingParameters().isSetMinThreads()) {
pl.setMinThreads(getThreadingParameters().getMinThreads());
}
if (getThreadingParameters().isSetMaxThreads()) {
pl.setMaxThreads(getThreadingParameters().getMaxThreads());
}
}
}
}