Another option I have used in the past on platforms where I couldn't control
the JVM settings was to randomize the capitalization of the host/domain name
down in the app code.  This was enough in older JVM's to cause
String.equals() to fail and therefore, you would get a new IP.  This has its
limitations, but works for some cases.

----- Original Message ----- 
From: "Andrew C. Oliver" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 01, 2003 4:26 PM
Subject: Re: [Juglist] JVM caching of IP addresses


> I'm not 100% sure but I know Michael Cannon-Brooks of Javablogs.com had
this
> problem: http://blogs.atlassian.com/rebelutionary/archives/000038.html
>
> I found this:
http://java.sun.com/j2se/1.4.1/docs/guide/net/properties.html
>
> networkaddress.cache.ttl (default: -1)
>     Specified in java.security to
> indicate the caching policy for successful name lookups from the name
> service.. The value is specified as as integer to indicate the number of
> seconds to cache the successful lookup.
>
>     A value of -1 indicates "cache
> forever".
>
> So it looks like you could set the java.security properties...
>
> On 6/1/03 3:56 PM, "Richard O. Hammer" <[EMAIL PROTECTED]> wrote:
>
> > I have a problem which leads me to believe that the JVM caches IP
> > addresses for domain names.  Can someone tell me if this is true, and
> > if there is a way to turn it off?
> >
> > I am trying to open a Socket to a domain with a dynamically assigned
> > IP address.  After the IP address changed for the domain (with the JVM
> > still running) my Java program can't find it.
> >
> > This is running on:
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
> > Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
> >
> > Thank you,
> > Rich Hammer
> >
> >
> > _______________________________________________
> > Juglist mailing list
> > [EMAIL PROTECTED]
> > http://trijug.org/mailman/listinfo/juglist_trijug.org
>
> -- 
> Andrew C. Oliver
> http://www.superlinksoftware.com/poi.jsp
> Custom enhancements and Commercial Implementation for Jakarta POI
>
> http://jakarta.apache.org/poi
> For Java and Excel, Got POI?
>
>
> _______________________________________________
> Juglist mailing list
> [EMAIL PROTECTED]
> http://trijug.org/mailman/listinfo/juglist_trijug.org
>



_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to