About the LDAP Resource Adaptor
The LDAP resource adaptor lets you connect from a Rhino SLEE to LDAP servers, to search and retrieve directory entries.
Features include:
-
Asynchronous query API — exposes a resource adaptor type that provides an asynchronous API, in an OpenCloud namespace.
-
Graceful connection establishment — provides "graceful" connections to LDAP servers, which must successfully respond to N "poll" query operations (read-only queries on specific DNs), before being used for outgoing client requests ; keeps an LDAP server from being swamped with requests immediately after it (re)starts and begins accepting connections.
-
LDAP searches — lets you use the API to perform LDAP Search operations.
-
LDAP server groups — supports LDAP server groups.
Topics
This document includes the following topics:
Topic | Explains how to… |
---|---|
configure the resource adaptor using properties |
|
monitor statistics |
More information
Configuring the LDAP Resource Adaptor
To configure the LDAP RA, you declare the following properties in its deployment descriptor:
Name | Type | Default | Description |
---|---|---|---|
|
|
LDAP user to use for each connection |
|
|
|
LDAP password to use for each connection |
|
|
|
LDAP server group information to use for the connections |
|
|
|
|
version of the protocol to use; can be 2 or 3 |
|
|
|
defines how long, in seconds, the RA should wait when trying to establish a TCP connection with a remote peer |
|
|
|
timeout, in milliseconds, for a specific query |
|
|
|
how many TCP connections the RA will hold open |
|
|
|
how few TCP connections the RA will hold open (assuming the LDAP servers are reachable) |
|
|
|
how many queued queries will wait for a thread pool thread before they execute |
|
|
|
how long, in milliseconds, a query will wait in the queue before it executes |
|
|
|
time, in milliseconds, between polls on a new connection to an LDAP server
(for the "graceful connection establishment" feature)
|
|
|
|
how many successful polls before sending regular queries to the LDAP server
(for the "graceful connection establishment" feature)
|
|
|
|
LDAP DN to use for poll queries
(for the "graceful connection establishment" feature)
|
|
|
specify the LDAP search filter |
|
|
|
specify the LDAP search scope |
|
|
|
|
specify a list of result codes that should not be treated as poll failures.
(for the "graceful connection establishment" feature)
|
|
|
|
how long, in milliseconds, to wait before closing idle connections 0 =
do not close based on idle time
|
|
|
|
how many queries a specific TCP connection can have before it closes 0 =
do not close based on based on number of queries
|
LDAP server groups
LDAP server groups are sets of servers where one is a primary server, and the rest are backup servers. Queries go to the primary server if available, otherwise to the backup server(s). For multiple server groups, the RA balances queries are across groups.
You specify all LDAP server groups in a single string, white-space separated; and each server name may optionally contain a port number to use instead of the default LDAP port (389). For example:
Server group configuration | What it specifies |
---|---|
|
1 group of 1 server |
|
2 groups, each with 1 server |
|
2 groups, 1 with a backup server (server2) |
Monitoring resource adaptor statistics
The LDAP RA’s statistics are available under the parameter-set name LDAP-RA.ldap.Queries
; so you can monitor them using this command:
$ rhino-stats -m LDAP-RA.ldap.Queries
Statistics parameter set
A list of statistics with descriptions can be displayed with the rhino-stats -l
command:
Parameter Set: LDAP-RA.ldap.Queries Parameter Set Type: ResourceAdaptorID[name=LDAP,vendor=OpenCloud,version=2.2].LDAPStats Description: Statistics for the LDAP RA Counter type statistics: Id: Name: Label: Description: 0 availableThreads availThrd Current number of threads available to perform queries 1 queries queries Number LDAP queries started by the RA 2 successfulQueries success Number of successful LDAP queries 3 failedQueries failed Number of failed LDAP queries 4 rejectedQueries reject Number of search tasks that were rejected because the queue was full 5 activeConnections connections Current number of active connections to the LDAP server 6 queueSize qsize Current number of queued search tasks waiting to be executed 7 queueTimeouts timeouts Number of search tasks that timed out waiting on the queue Sample type statistics: Id: Name: Label: Description: 8 queueWaitTime qwait Time spent by search tasks waiting in the queue 9 connWaitTime connwait Time spent obtaining an LDAP connection from the pool 10 queryTime querytime Time spent waiting for the search response