Tips for Servlet Developers

Maximizing servlet performance requires techniques somewhat different from those used to maximize the performance of stand-alone programs. One important step is to avoid having to connect to the LDAP server for each request. The connection-pooling model presented in this chapter solves this problem.

Another step to increase performance is to make use of the caching module of the SDK to avoid having to go out on the wire to satisfy repetitive searches. The cache object can be queried to see how many requests are being satisfied from the cache versus going to the directory. See Chapter 15 for details on how and when to use LDAPCache.

Finally, keep the DN of each record around to use as a key for direct access to a user's ...

Get LDAP Programming with Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.