protected boolean isPoolingConnections(Object principal) {
        return isPoolingEnabled() && principal != null && principal.equals(getSystemUsername());
    }
Returns {@code true} if LDAP connection pooling should be used when acquiring a connection based on the specified
account principal, {@code false} otherwise.
<p/>
This implementation returns {@code true} only if {@link #isPoolingEnabled()} and the principal equals the
{@link #getSystemUsername()}.  The reasoning behind this is that connection pooling is not desirable for
general authentication attempts by application end-users because the probability of re-use for that same
user-specific connection after an authentication attempt is extremely low.

@param principal the principal under which the connection will be made
@return {@code true} if LDAP connection pooling should be used when acquiring a connection based on the specified
account principal, {@code false} otherwise.
core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java