config.setName( "uid=admin,ou=system" );
config.setCredentials( "secret" );
if ( createLdapConnectionPool.additionalBinaryAttributes() != null
&& createLdapConnectionPool.additionalBinaryAttributes().length > 0 )
{
DefaultConfigurableBinaryAttributeDetector binaryAttributeDetector =
new DefaultConfigurableBinaryAttributeDetector();
binaryAttributeDetector.addBinaryAttribute(
createLdapConnectionPool.additionalBinaryAttributes() );
config.setBinaryAttributeDetector( binaryAttributeDetector );
}
DefaultLdapConnectionFactory factory = new DefaultLdapConnectionFactory( config );