We are using OpenDJ SDK for connecting with Directory Services. Below mentioned is code.
@Bean
public LDAPConnectionFactory createConnectionFactory(){
LDAPOptions ldapOptions = new LDAPOptions();
ldapOptions.setTimeout(30, TimeUnit.SECONDS);
final LDAPConnectionFactory factory = new LDAPConnectionFactory(host, port,ldapOptions);
Connections.newFixedConnectionPool(factory,connectionPoolSize);
return factory;
}
connection pool size parameter is set to 10 at present. The code was working fine, suddenly it started returning null object for getConnection() method on factory. When I comment out Connections.newFixedConnectionPool statement it works as per expected. Are we missing anything.