Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.5
-
None
Description
Currently a dummy search is made to server every time a connection is retrieved from the pool.
This behavior needs to be made configurable via adding a switch to the connection pool creation, in LdapConnectionProvider class via the setTestOnBorrow method:
```
// Create the Admin pool
adminPool = new LdapConnectionPool( poolFactory );
adminPool.setTestOnBorrow( true );
adminPool.setWhenExhaustedAction( GenericObjectPool.WHEN_EXHAUSTED_GROW );
adminPool.setMaxActive( max );
adminPool.setMinIdle( min );
adminPool.setMaxIdle( -1 );
adminPool.setTestWhileIdle( testWhileIdle );
adminPool.setTimeBetweenEvictionRunsMillis( timeBetweenEvictionRunMillis );
```