directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject Re: LdapConnectionPool.getConnection doing extraneous search?
Date Mon, 22 Mar 2021 16:05:38 GMT


On 22/03/2021 16:45, Shawn McKinney wrote:
> 
>> On Mar 22, 2021, at 10:43 AM, Shawn McKinney <smckinney@apache.org> wrote:
>>
>>>
>>> The risk not doing such a check is very very tenuous.
>>
> 
> Sorry, but asking for a clarification here.  Do you mean, not doing the check is risky?
 Or, is OK.

LDAP connections are quite stable. Again, this check is there to respect 
the commons-pool API contract. If the connection is dead, then doing 
this check will let the pool fetching another connection, which is good. 
OTOH, if you don't want to check connections while fetching one, then 
you are on your own (ie, deal with the consequences of a bad connection).

Usually, under heavy charged systems, it's better not to check 
connections, except on exceptional conditions:
* if the connection works, well, you are good to go
* if it fails, it's time to activate contingency plans (here, try to 
borrow another connection from the pool)

You are very much likely to fell in the first situation.

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@directory.apache.org
For additional commands, e-mail: api-help@directory.apache.org


Mime
View raw message