Yes, I saw that as well. My next step was going to be to create a fortress 
config property to set set it. However, looking through the code in the thread 
dump, I wasn't certain setting it would have any affect. 


----- Original Message -----
From: "Shawn McKinney" <[email protected]>
To: [email protected]
Sent: Monday, March 21, 2016 11:06:41 PM
Subject: Re: LDAP Connection Management

> On Mar 21, 2016, at 12:52 PM, Emmanuel Lécharny <[email protected]> wrote:
> 
> Le 21/03/16 18:20, Chris Pike a écrit :
>> Why isn't it being closed? Will setting the timeout on the connection have 
>> any affect? It looks like queue.poll will block for Long.MAX_VALUE. Is there 
>> a way to close all connections in the pool? 
> 
> The connection pool an be configured so that the connection has a
> timeout. Now, when teh pool is kiled, it should also kill all the
> connections.
> 
> I have to check if it's done correctly on both side (ie, in Fortress and
> in the LDAP API)

Don’t see a timeout set on fortress side:

public abstract class ApacheDsDataProvider
{
 ...     
        LdapConnectionConfig config = new LdapConnectionConfig();
        config.setLdapHost( host );
        config.setLdapPort( port );
        config.setName( Config.getProperty( GlobalIds.LDAP_ADMIN_POOL_UID, "" ) 
);
        PoolableObjectFactory<LdapConnection> poolFactory = new 
ValidatingPoolableLdapConnectionFactory( config );
…
        // 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.setMaxWait( 0 );

        // Create the User pool
        userPool = new LdapConnectionPool( poolFactory );
        userPool.setTestOnBorrow( true );
        userPool.setWhenExhaustedAction( GenericObjectPool.WHEN_EXHAUSTED_GROW 
);
        userPool.setMaxActive( max );
        userPool.setMinIdle( min );
        userPool.setMaxIdle( -1 );

Shawn

Reply via email to