code: private void initPool() {
          if (logger.isWarnEnabled()) {
              logger.warn("Start to initialize connection pool with url: " + url + " ...");
          }
  
          for (int i = 0; (i < initialSize) && (xpool.size() < initialSize); i++) {
              pool.lock();
  
              try {
                  if (pool.isClosed()) {
                      break;
                  }
  
                  if ((i < initialSize) && (xpool.size() < initialSize)) {
                      PoolableConnection poolableConn = newConnection();
  
                      if (!pool.add(poolableConn)) {
                          detroyConnection(poolableConn);
                      }
                  }
              } finally {
                  pool.unlock();
              }
          }
  
          if (logger.isWarnEnabled()) {
              logger.warn("End to initialize connection pool with url: " + url + " ...");
          }
      }
docs: Method initPool.