code: public void validateConnections()
     {
        boolean anyDestroyed = false;
  
        ManagedConnectionFactory mcf = pool.getConnectionManager().getManagedConnectionFactory();
  
        if (mcf instanceof ValidatingManagedConnectionFactory)
        {
           ValidatingManagedConnectionFactory vcf = (ValidatingManagedConnectionFactory) mcf;
           long timestamp = System.currentTimeMillis();
  
           for (ConnectionListener cl : listeners)
           {
              if (cl.changeState(FREE, VALIDATION))
              {
                 if (cl.getValidated() + pool.getConfiguration().getBackgroundValidationMillis() <= timestamp)
                 {
                    ConnectionListener result = validateConnectionListener(listeners, cl, FREE);
                    if (result == null)
                    {
                       if (Tracer.isEnabled())
                          Tracer.destroyConnectionListener(pool.getConfiguration().getId(), this, cl,
                                                           false, false, true,
                                                           false, false, false, false,
                                                           Tracer.isRecordCallstacks() ?
                                                           new Throwable("CALLSTACK") : null);
                       
                       anyDestroyed = true;
                    }
                 }
                 else
                 {
                    if (!cl.changeState(VALIDATION, FREE))
                    {
                       if (Tracer.isEnabled())
                          Tracer.destroyConnectionListener(pool.getConfiguration().getId(), this, cl,
                                                           false, false, false,
                                                           false, true, false, false,
                                                           Tracer.isRecordCallstacks() ?
                                                           new Throwable("CALLSTACK") : null);
                       
                       destroyAndRemoveConnectionListener(cl, listeners);
                    }
                 }
              }
           }
        }
        else
        {
           log.validateOnMatchNonCompliantManagedConnectionFactory(mcf.getClass().getName());
        }
  
        if (anyDestroyed)
           prefill();
     }
docs: {@inheritDoc}