use of org.apereo.cas.monitor.PooledLdapConnectionFactoryMonitor in project cas by apereo.
the class LdapMonitorConfiguration method pooledLdapConnectionFactoryMonitor.
@Autowired
@Bean
public Monitor pooledLdapConnectionFactoryMonitor(@Qualifier("pooledConnectionFactoryMonitorExecutorService") final ExecutorService executor) {
final MonitorProperties.Ldap ldap = casProperties.getMonitor().getLdap();
final PooledConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(ldap);
return new PooledLdapConnectionFactoryMonitor(executor, Long.valueOf(ldap.getMaxWait()).intValue(), connectionFactory, new SearchValidator());
}
Aggregations