hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenneth Wilcox" <kwilco...@cox.net>
Subject RE: DNS Cache Timeout
Date Mon, 27 Jun 2005 02:31:54 GMT
Additionally depending on what JVM you are using the following is true:

JRE 1.3 you can set sun.net.inetaddr.ttl as a -D parameter.  Deprecated in
1.4

JRE 1.4 the preferred method is networkaddress.cache.ttl.  This property
cannot be set as a -D parameter, but must be specified in the security file
or set programmatically using Security.setProperty

Ken

> -----Original Message-----
> From: Kenneth Wilcox [mailto:kwilcox75@cox.net]
> Sent: Sunday, June 26, 2005 10:25 PM
> To: 'HttpClient User Discussion'
> Subject: RE: DNS Cache Timeout
> 
> I guess what I am saying is that I believe System.setProperty will not
> work.
> You need to set the property with the Security class because you are
> setting
> a property that is specified in the security file
> 
> java.security.Security.setProperty("networkaddress.cache.ttl" , "10000");
> 
> And yes, Java by default caches DNS entries forever unless you override it
> with the setting above.
> 
> Let me know if that helped, I believe this will solve your issue.
> 
> -Ken
> 
> 
> 
> > -----Original Message-----
> > From: Aaron Braeckel [mailto:braeckel@ucar.edu]
> > Sent: Thursday, June 23, 2005 12:57 PM
> > To: HttpClient User Discussion
> > Subject: Re: DNS Cache Timeout
> >
> > In my case I am deploying the application via Java Web Start, so I am
> > not guaranteed access to the java.security file on end user machines.  I
> > have to do it either via the -D command line option or programmatically
> > via System.setProperty().  Currently I am doing it programatically.
> >
> > Aaron
> >
> > Kenneth Wilcox wrote:
> > > I think those properties need to be set in the security file, not as -
> D
> > > parameters - agree?
> > >
> > > Ken
> > >
> > >
> > >>-----Original Message-----
> > >>From: Aaron Braeckel [mailto:braeckel@ucar.edu]
> > >>Sent: Wednesday, June 22, 2005 4:19 PM
> > >>To: httpclient-user@jakarta.apache.org
> > >>Subject: DNS Cache Timeout
> > >>
> > >>Hello,
> > >>
> > >>  I am using HttpClient 3.0RC2 with an application that runs
> constantly
> > >>and contacts a web server frequently.  I am switching DNS entries to
> > >>point to the backup server if problems occur with the primary server.
> > >>Currently I am not seeing any recognition of the change when I switch
> > >>the DNS entry, so it seems like a client-side DNS caching issue.  Is
> > >>there any way to specify DNS cache timeouts (or even whether or not to
> > >>use caching) with HttpClient?  I wasn't able to find any information
> on
> > >>this topic anywhere.
> > >>
> > >>I am setting the appropriate properties to restrict DNS caching
> through
> > >>Java core methods (setting "sun.net.inetaddr.ttli" and
> > >>"networkaddress.cache.ttl¨) but so far I have not seen any effect.
> > >>
> > >>Thanks,
> > >>Aaron
> > >>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail: httpclient-user-
> help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: httpclient-user-
> help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message