if (pools == null) {
pools = new LinkedList<ConnectionPool>();
cache.put(key, pools);
}
ConnectionPool connection = null;
if (pools.size() == maxConnections) {
connection = pools.removeFirst();
}
// Now.. we might get a connection, but it might be that we need to
// dump it..
if (connection != null && connection.expiredCheck()) {
connection = null;
}
if (connection == null) {
Connection delegate = createConnection(key);