protected void onInit() {
        super.onInit();
        ensureContextFactory();
    }
Configures the {@link LdapContextFactory} implementation that is used to create LDAP connections for
authentication and authorization.  If this is set, the {@link LdapContextFactory} provided will be used.
Otherwise, a {@link JndiLdapContextFactory} instance will be created based on the properties specified
in this realm.

@param ldapContextFactory the factory to use - if not specified, a default factory will be created automatically.
core/src/main/java/org/apache/shiro/realm/ldap/AbstractLdapRealm.java