core/cas-server-core-configuration/src/main/java/org/apereo/cas/configuration/support/Beans.java
/**
     * New blocking connection pool connection pool.
     *
     * @param l the l
     * @return the connection pool
     */
New blocking connection pool connection pool.
@param l the l
@return the connection pool
New blocking connection pool connection pool . @param l the l @return the connection pool
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());
        LOGGER.debug("Initializing ldap connection pool for {} and bindDn {}", l.getLdapUrl(), l.getBindDn());
        cp.initialize();
        return cp;
    }
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 ( ) ) ; LOGGER . debug ( "Initializing ldap connection pool for {} and bindDn {}" , l . getLdapUrl ( ) , l . getBindDn ( ) ) ; cp . initialize ( ) ; return cp ; }
New blocking connection pool connection pool.
New blocking connection pool connection pool .