public static DirContext getDirContext(boolean master) throws ServiceException { try { long start = ZimbraPerf.STOPWATCH_LDAP_DC.start(); DirContext dirContext = new InitialLdapContext(getDefaultEnv(master), null); ZimbraPerf.STOPWATCH_LDAP_DC.stop(start);  return dirContext; } catch (NamingException e) { throw ServiceException.FAILURE("getDirectContext", e); }
public static DirContext getDirContext() throws ServiceException { return getDirContext(false);
    public static DirContext getDirContext(boolean master) throws ServiceException {        try {            long start = ZimbraPerf.STOPWATCH_LDAP_DC.start();            DirContext dirContext = new InitialLdapContext(getDefaultEnv(master), null);            ZimbraPerf.STOPWATCH_LDAP_DC.stop(start);            //ZimbraLog.account.error("getDirContext", new RuntimeException("------------------- OPEN"));            return dirContext;        } catch (NamingException e) {            throw ServiceException.FAILURE("getDirectContext", e);        }    }