james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harmeet Bedi" <harm...@kodemuse.com>
Subject Re: [PATCH] Upgrade to DnsJava 1.3.1, add DNS Server autodetect, Make use of higher level api
Date Mon, 20 Jan 2003 01:00:01 GMT
Regd: Collection vs. List in DNSServer and MailetContext.

Change from Collection->List sounds good to me. Will go ahead and make this
change in a day or two unless someone objects or gets to it sooner.


Regd: autoritative dns lookup option in config.xml

From: "Serge Knystautas" <sergek@lokitech.com>
> Ok, so we're leaving it as is?
I think it is a good config option. I am only interested in knowing how
folks use this. If anyone changes this flag, I would be curious to know the
use case.

Harmeet
----- Original Message -----
From: "Serge Knystautas" <sergek@lokitech.com>
To: "James Developers List" <james-dev@jakarta.apache.org>
Sent: Sunday, January 19, 2003 1:42 PM
Subject: Re: [PATCH] Upgrade to DnsJava 1.3.1, add DNS Server autodetect,
Make use of higher level api


> ----- Original Message -----
> From: "Harmeet Bedi" <harmeet@kodemuse.com>
>
>
> > DNSServer block returs a sorted collection now and has been from the
first
> > instance of the block. One could loose ordering in a collection but
> > converting to list does not help as list is a collection. Iterator may
be
> > the best to express the idea of order.
>
> err, a Collection is unordered, and a List is an *ordered* Collection.
Yes,
> a List is a Collection, differentiated by the exact attribute we want...
> ordering.  An Iterator would restrict how you could use the result.
>
> > Sorting is the responsibility of DNSServer implementation not the user
of
> > API. The collection returns MX Records sorted by priority. Remote
Delivery
> > gets hold of and collection through mailet context(o.a.j.James),
converts
> to
> > an iterator and attempts to send email to the first mail server address
> than
> > second if first fails and so on. The only 2 methods called on Collection
> are
> > Collection::size and Collection::iterator.
>
> Right, and on a Collection, iterator is not guaranteeing an order.
>
> > Converting to a List will not really help as the returned
collection/list
> > contains only contains the IP address. There is not enough context like
> > priority in the returned collection/list to allow the user of the API to
> > effectively sort on.
>
> The DNS server needs to return the List... it *will* know the correct
order
> to put the IP addresses in.  Yes, we cannot later convert it to a List and
> expect it to create an order, which I why I think the DNS server should
> return a List.  If it is already, that's great.
>
> >     /**
> >      * Returns a Collection of Strings of hostnames or ip addresses that
> >      * are specified as mail server listeners for the given hostname.
> >      * This is done using MX records, and the hostnames or ip addresses
> >      * are returned sorted by MX priority.
> >      *
> >      * @param host - the domain name for which to find mail servers
> >      * @return a Collection of Strings of hostnames, sorted by priority
> >      */
> >     Collection getMailServers(String host);
>
> Yes ok, so this should be changed... getMailServers(String host) should
> return a List because those IP addresses should be ordered by the
underlying
> implementation.
>
> > > I thought there was a conf option for whether to do authoritative
> lookups,
> > > no?
> >
> > Yes it does and it seems good to have the config option.
> > The default is false and that is probably the better option. I am not
> > suggesting the config option should be removed but curious if folks ever
> > change the authoritative lookup setting.
>
> Ok, so we're leaving it as is?
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
>
>
> --
> To unsubscribe, e-mail:
<mailto:james-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:james-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message