code: public static ConnectionPool newBlockingConnectionPool(final AbstractLdapProperties l) {
          final DefaultConnectionFactory bindCf = newConnectionFactory(l);
          final PoolConfig pc = newPoolConfig(l);
          final BlockingConnectionPool cp = new BlockingConnectionPool(pc, bindCf);
  
          cp.setBlockWaitTime(newDuration(l.getBlockWaitTime()));
          cp.setPoolConfig(pc);
  
          final IdlePruneStrategy strategy = new IdlePruneStrategy();
          strategy.setIdleTime(newDuration(l.getIdleTime()));
          strategy.setPrunePeriod(newDuration(l.getPrunePeriod()));
  
          cp.setPruneStrategy(strategy);
          cp.setValidator(new SearchValidator());
          cp.setFailFastInitialize(l.isFailFast());
  
          if (CommonHelper.isNotBlank(l.getPoolPassivator())) {
              final AbstractLdapProperties.LdapConnectionPoolPassivator pass =
                      AbstractLdapProperties.LdapConnectionPoolPassivator.valueOf(l.getPoolPassivator().toUpperCase());
              switch (pass) {
                  case CLOSE:
                      cp.setPassivator(new ClosePassivator());
                      break;
                  case BIND:
                      LOGGER.debug("Creating a bind passivator instance for the connection pool");
                      final BindRequest bindRequest = new BindRequest();
                      bindRequest.setDn(l.getBindDn());
                      bindRequest.setCredential(new Credential(l.getBindCredential()));
                      cp.setPassivator(new BindPassivator(bindRequest));
                      break;
                  default:
                      break;
              }
          }
  
          LOGGER.debug("Initializing ldap connection pool for {} and bindDn {}", l.getLdapUrl(), l.getBindDn());
          cp.initialize();
          return cp;
      }
docs: New blocking connection pool connection pool.
  
  @param l the l
  @return the connection pool