-
Suggestion
-
Resolution: Timed out
-
None
-
None
-
None
Currently, the way connection pooling is done for LDAP is difficult to understand. On top of Java's strangeness in setting things via environment properties, Spring also behaves strangely, and Crowd adds complexity on top of it. We should try and harmonise how connection pooling is switched on or off. A description of current behaviour follows:
Unlike other pooling parameters, which are specified via either system properties or environment properties, the pooling parameter "com.sun.jndi.ldap.connect.pool" is only specified via environment property.
The environment property can be set or unset in various circumstances:
- In Crowd's LDAPPropertiesManager, if the "ldap.pooling" attribute is set, then the pooling parameter will be added to the environment.
- In Spring, AbstractContextSource:
- For an anonymous environment, will add the JNDI property to the environment if pooling is enabled, and will remove it if pooling is disabled.
- For Authenticated environments, it will not change pooling settings, except when the AbstractContextSource goes into an Anonymous environment, which will happen in afterPropertiesSet, as well if certain context sources are used.