Brian (on the BCC list),

Would you care to comment on this?  The code in James appears to be
essentially the same as your Lookup method, except for adaptations.

The claim is that the algorithm checks the cache, finds nothing, does a
lookup, puts the record into the cache, and then queries the cache.  But
since TTL is 0, the cache wouldn't have the record.

>From what I see in the Cache.Element code, the cache should be valid for the
second within which the value is cached.  Of course, if that happens at the
trailing edge, then the value will be missing, but then the process should
repeat, and should be valid.

Jeff, you should turn on DEBUG in environment.xml to see what gets logged.
Jeff, also to answer your question, the reason why the cache is used is that
the result of a lookup is a Message.  The dnsjava Cache class has the code
for handling the set of records in that Message.  The lookup code doesn't
replicate that code.  It leverages the cache to do the work.

        --- Noel


-----Original Message-----
From: Cai Jeff [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:38
To: James Users List
Subject: Re: DNS problem?


I think it is a bug of dnsjava but james.
Please see the definition of TTL:
a 32 bit signed integer that specifies the time
interval
that the resource record may be cached before the
source
of the information should again be consulted.  Zero
values are interpreted to mean that the RR can only be
used for the transaction in progress, and should not
be
cached.  For example, SOA records are always
distributed
with a zero TTL to prohibit caching.  Zero values can
also be used for extremely volatile data.

So dnsjava never caches any records whose TTL is 0.
But James always want to store records into cache and
find from the cache. I think it is a James' problem.

> TTL's should never be 0.  TTL's shouldn't even come
> close to that.  This
> is a misconfigured DNS server.
>
> You can report this bug to the person who wrote the
> DNS client lib we
> use (www.xbill.org/dnsjava) as to how to better
> handle a misconfigured
> DNS server, but I figure we'll be hopefully moving
> to JNDI DNS interface
> at some point anyway.  I'm not sure how that library
> would handle this
> DNS server.
>
> --
> Serge Knystautas
> President
> Lokitech >> software . strategy . design >>
> http://www.lokitech.com/
> p. 1.301.656.5501
> e. [EMAIL PROTECTED]
>
> Cai Jeff wrote:
> > How about my question? Any idea?
> >
> >>hi,
> >>
> >>One of our users wants to mail to the address
> >>[EMAIL PROTECTED] but faild. The james reported
> >>James.Mailet: RemoteDelivery: No mail server found
> >>for: bdi.com.cn.
> >>When I used nslookup I can get the following MX
> RR,
> >>bdi.com.cn      mail exchanger = 10
> mail.bdi.com.cn.
> >>bdi.com.cn      mail exchanger = 10
> >>notesmtp.bdi.com.cn.
> >>But if I used dig I found the TTL is 0s for those
> MX
> >>RR:
> >>bdi.com.cn.             0       IN      MX      10
> >>mail.bdi.com.cn.
> >>bdi.com.cn.             0       IN      MX      10
> >>notesmtp.bdi.com.cn.
> >>Then I looked into the source of DNSServer.java, I
> >>found that when doing the DNS query, james first
> >>tries
> >>to find the result in the cache, if not exists
> then
> >>it
> >>queries the configed DNS to get the results and
> put
> >>it
> >>in to the cache, then it queries again from the
> >>cache
> >>and return the results.
> >>But if the results TTL is 0s, I guess that the
> cache
> >>would never caches them. So the second query from
> >>cache could not get anything.
> >>Why james must do the second query from the cache?
> >>After the first query it gets the results and put
> >>them
> >>into the cache, why just return these results?
> >>
> >>Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to