public static void releaseConnection(LDAPConnection connection) {
        if (connection != null) {
            if (connection.getConnectionPool() != null) {
                connection.getConnectionPool().releaseConnection(connection);
            } else {
                connection.close();
            }
        }
    }
@author Marc Savy {@literal <msavy@redhat.com>}
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/LDAPConnectionFactory.java