private static boolean domainDnExists(DirContext ctxt, String dn) throws NamingException, ServiceException {
private static boolean domainDnExists(DirContext ctxt, String dn) throws NamingException {
    private static boolean domainDnExists(DirContext ctxt, String dn) throws NamingException, ServiceException {        try {            NamingEnumeration ne = ctxt.search(dn,"objectclass=dcObject", sObjectSC);            boolean result = ne.hasMore();            ne.close();            return result;        } catch (InvalidNameException e) {            return false;                                } catch (NameNotFoundException nnfe) {            return false;        }    }