You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2021/06/23 18:48:09 UTC

[directory-fortress-core] branch FC-238 updated: use new commons pool params

This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch FC-238
in repository https://gitbox.apache.org/repos/asf/directory-fortress-core.git


The following commit(s) were added to refs/heads/FC-238 by this push:
     new 63976c7  use new commons pool params
63976c7 is described below

commit 63976c7d3776306b8be7c919c1cfd45998f6fad9
Author: Shawn McKinney <sm...@symas.com>
AuthorDate: Wed Jun 23 13:48:02 2021 -0500

    use new commons pool params
---
 .../fortress/core/ldap/LdapConnectionProvider.java     | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java b/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
index c0ed8c9..dfb18bd 100644
--- a/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
@@ -193,26 +193,25 @@ public class LdapConnectionProvider
         }
 */
 
-        // TODO: FIXME #1
         PooledObjectFactory<LdapConnection> poolFactory = new ValidatingPoolableLdapConnectionFactory( config );
-        //PoolableObjectFactory<LdapConnection> poolFactory = new ValidatingPoolableLdapConnectionFactory( config );
 
         // Create the Admin pool
         adminPool = new LdapConnectionPool( poolFactory );
         adminPool.setTestOnBorrow( testOnBorrow );
-        //adminPool.setWhenExhaustedAction( GenericObjectPool.WHEN_EXHAUSTED_GROW );
-        //adminPool.setMaxActive( max );
+        adminPool.setMaxTotal( max );
+        adminPool.setBlockWhenExhausted( true );
+        adminPool.setMaxWaitMillis( 5000 );
         adminPool.setMinIdle( min );
         adminPool.setMaxIdle( -1 );
         adminPool.setTestWhileIdle( testWhileIdle );
         adminPool.setTimeBetweenEvictionRunsMillis( timeBetweenEvictionRunMillis );
-        //adminPool.setMaxWait( 0 );
 
         // Create the User pool
         userPool = new LdapConnectionPool( poolFactory );
         userPool.setTestOnBorrow( testOnBorrow );
-        //userPool.setWhenExhaustedAction( GenericObjectPool.WHEN_EXHAUSTED_GROW );
-        //userPool.setMaxActive( max );
+        userPool.setMaxTotal( max );
+        userPool.setBlockWhenExhausted( true );
+        userPool.setMaxWaitMillis( 5000 );
         userPool.setMinIdle( min );
         userPool.setMaxIdle( -1 );
         userPool.setTestWhileIdle( testWhileIdle );
@@ -255,8 +254,9 @@ public class LdapConnectionProvider
             poolFactory = new ValidatingPoolableLdapConnectionFactory( logConfig );
             logPool = new LdapConnectionPool( poolFactory );
             logPool.setTestOnBorrow( testOnBorrow );
-            //logPool.setWhenExhaustedAction( GenericObjectPool.WHEN_EXHAUSTED_GROW );
-            //logPool.setMaxActive( logmax );
+            logPool.setMaxTotal( max );
+            logPool.setBlockWhenExhausted( true );
+            logPool.setMaxWaitMillis( 5000 );
             logPool.setMinIdle( logmin );
             logPool.setTestWhileIdle( testWhileIdle );
             logPool.setTimeBetweenEvictionRunsMillis( logTimeBetweenEvictionRunMillis );