code: public synchronized void close() {
  
          this.isPoolClosed = true;
  
          while (this.connectionsInactive.size() > 0) {
              PooledConnection connection = dequeueFirstIfAny();
  
              if (connection != null) {
                  closePhysically(
                      connection,
                      "closing inactive connection when connection pool was closed.");
              }
          }
      }
docs: Closes this connection pool. No further connections can be obtained from it after this.
  All inactive connections are physically closed before the call returns.
  Active connections are not closed.
  There may still be active connections in use after this method returns.
  When these connections are closed and returned to the pool they will be
  physically closed.