At
http://directory.apache.org/api/user-guide/2.1-connection-disconnection.html
there's a nice easy to follow example of how to set up connection pooling.

The unfortunate thing is that it just doesn't work. The following line:

PoolableLdapConnectionFactory factory = new
PoolableLdapConnectionFactory( config );

won't compile because PoolableLdapConnectionFactory isn't a class. I'm
guessing this is a change in API that's not yet filtered through to the
documentation yet. Digging around 1.0.0-RC2 does turn up either
DefaultPoolableLdapConnectionFactory or
ValidatingPoolableLdapConnectionFactory

Is it simply a case of picking one of those based on the behaviour I want.
Given I'm connecting multiple times to the same server with the same user,
from my reading of the Javadoc I can simply get away with the
DefaultPoolableLdapConnectionFactory - have I missed anything?

Thanks,

Greg

Reply via email to