LDAPConnectionPool
The LDAPConnectionPool
provides LDAP connections for DataSource
and/or DataSink
implementations that need access to databases. It implements the LdapContextProvider
interface which is used to access an javax.naming.ldap.LdapContext
. The latter is responsible for connection pooling. Connection pooling of the JDK is used. See here.
Currently, the default connection pooling configuration from the JDK is used. There is no other way than using system properties to configure the sizing of the connection pooling.
Configuration
Name | Type, usage constraints, defaults | Description |
---|---|---|
connectionUrl | required: paraVal default: none type: connection url starting with ldaps?:// | The connection URL to be passed to establish a connection. |
username | optional: paraVal default: none type: string | The username DN to be passed to establish a bind. |
password | optional: paraVal default: none type: string sensitive: true | The binding password to be passed to establish a connection. |
sslSettings | optional: paraMap default: none type: string/string | The SSL configuration settings used for this connection pool. It uses the Java system property names to set up the key and trust stores. |
connectionProperties | optional: paraMap default: none type: name value pairs | Adds a custom property to the environment of the InitialLdapContext . This feature can be used to set, for example, timeout properties. |
retry | optional: paraVal default: 5 type: integer | The number of retry attempts the connection pool carried out when a connection cannot be established. |
retryInterval | optional: paraVal default: 5 type: integer | The number of seconds between connection trials. |
Example
Example using an unencrypted connection:
<object type="LDAPConnectionPool" name="ldapConnection">
<dp:paraVal name="connectionUrl" value="ldap://localhost:10389"/>
<dp:paraVal name="username" value="uid=admin,ou=system"/>
<dp:paraVal name="password" value="secret"/>
</object>
Example using an SSL connection:
<object type="LDAPConnectionPool" name="ldapConnection">
<dp:paraVal name="connectionUrl" value="ldap://localhost:10389"/>
<dp:paraVal name="username" value="uid=admin,ou=system"/>
<dp:paraVal name="password" value="secret"/>
<dp:paraMap name="sslSettings">
<value name="javax.net.ssl.trustStore" value="truststore.jks"/>
<value name="javax.net.ssl.trustStorePassword" value="secret"/>
<value name="javax.net.ssl.trustStoreType" value="jks"/>
</dp:paraMap>
</object>