On 05/18/2014 04:08 AM, Neil A. Wilson wrote:
> On 05/17/2014 06:44 AM, Alon Bar-Lev wrote:
>> Hi,
>>
>> Have you reviewed this request? Adding Resolver interface class to
>> perform hostname->InetAddress resolution before calling the socket
>> factory is important to enable full control over the address selection
>> as required for most of the server sets. You have done this partially
>> at the SRVRecord implementation.
>
> This is something I am still considering for addition to the LDAP SDK at
> some point.
I have just committed a change that adds a new RoundRobinDNSServerSet
class. This class provides support for a single hostname that resolves
to multiple IP addresses. Because this scenario is typically referred
to as a round-robin DNS configuration, I have named the server set that.
However, note that the implementation does not strictly require the
use of DNS (you can force its use by specifying a JNDI DNS provider URL,
but you can also rely on the default name service mechanism which may
look in other places like the /etc/hosts file or NIS). Also note that
it does not require round-robin selection of addresses -- there are also
options available to use a failover selection (in which it consistently
uses addresses in the order retrieved from the server) or a randomized
order.
Neil
|