Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc.dns

## Class DNSKerberosLocator

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.dns.DNSKerberosLocator

    public final class DNSKerberosLocator
    extends Object

Represents a DNS Kerberos Locator

### Method Summary

All Methods Static Methods Concrete Methods
`static boolean` `isRealmValid​(String realmName)` Returns whether a realm is valid by retrieving the KDC list in DNS SRV records.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### isRealmValid

    public static boolean isRealmValid​(String realmName)
                                throws NamingException

Returns whether a realm is valid by retrieving the KDC list in DNS SRV records. This will only work if DNS lookup is setup properly or the realms are properly defined in krb5 config file. Otherwise this will fail since the realm cannot be found.

Parameters:
  `realmName` - the realm to test
Returns:
  true if realm is valid, false otherwise
Throws:
  `NamingException` - if DNS failed, so realm existence cannot be determined