@Override
  public void close() throws KerberosOperationException {
    this.searchControls = null;

    if (this.ldapContext != null) {
      try {
        this.ldapContext.close();
      } catch (NamingException e) {
        throw new KerberosOperationException("Unexpected error", e);
      } finally {
        this.ldapContext = null;
      }
    }

    setOpen(false);
  }
Closes and cleans up any resources used by this KerberosOperationHandler
<p/>
It is expected that this KerberosOperationHandler will not be used after this call.
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java