env.put(Context.SECURITY_CREDENTIALS,
bindPwd == null ? ldapConnConf.get("credentials").getValues().get(0) : bindPwd);
try {
final InitialDirContext ctx = new InitialDirContext(env);
return ctx.lookup(objectDn);
} catch (Exception e) {
return null;
}
}
}