> On Jun 22, 2021, at 2:01 PM, Stefan Seelmann <m...@stefan-seelmann.de> wrote: > > On 6/22/21 3:47 PM, Shawn McKinney wrote: >> I switched from this: //PoolableObjectFactory<LdapConnection> >> poolFactory = new ValidatingPoolableLdapConnectionFactory( config ); >> >> To: >> PooledObjectFactory<LdapConnection> poolFactory = new >> ValidatingPoolableLdapConnectionFactory( config ); >> > >> But can’t use these: //adminPool.setWhenExhaustedAction( >> GenericObjectPool.WHEN_EXHAUSTED_GROW ); > > I the changelog > https://commons.apache.org/proper/commons-pool/changes-report.html I found > >> Remove WhenExhuastedAction.GROW since it is equivalent to > WhenExhuastedAction.FAIL with a maxActive value of Integer.MAX_VALUE. > >> //adminPool.setMaxActive( max ); > > According to the git log this was rnamed to maxTotal > > https://github.com/apache/commons-pool/commit/c7d527543868ea2835e609e072b8a6423d4d99cb > > > If I understand correctly the new way it set maxTotal to a large number > (Integer.MAX_VALUE).
Hi Stefan, thanks for taking the time to look into this... Here’s where I’m at: pool.setMaxTotal( max ); pool.setBlockWhenExhausted( isBlocking ); pool.setMaxWaitMillis( maxWait ); As you pointed out, now use maxTotal. Having thought about this a bit more, I’m hesitant to allow a pool to grow unconstrained or to allow it to block for an unlimited time period, waiting for a connection to free up. Having a reasonable maxTotal and allowing to block for … at most say 10 seconds seems to be sensible way of handling this. — Shawn --------------------------------------------------------------------- To unsubscribe, e-mail: api-unsubscr...@directory.apache.org For additional commands, e-mail: api-h...@directory.apache.org