Mark Derricutt's Disturbing Thoughts

My Top Tags

                                       

My Jaiku

Chrome Division – Doomsday Rider

Thursday, 21 August 2008 5:43 A GMT+12

1 Session per VM: Another Scaling Alternative

Wednesday, 20 August 2008 9:47 P GMT+12

The BGGA myth - Functional Java | Google Groups

Wednesday, 20 August 2008 7:33 A GMT+12

Spock's Beard – On A Perfect Day (live)

Wednesday, 20 August 2008 5:57 A GMT+12

Ola Bini: JtestR 0.3.1 Released

Tuesday, 19 August 2008 10:00 P GMT+12

Enslaved – Violet Dawning

Tuesday, 19 August 2008 6:14 A GMT+12

Distributed Messaging with Jetlang and Terracotta

Monday, 18 August 2008 10:17 P GMT+12

The Music of 2008 - week 33

Monday, 18 August 2008 8:57 A GMT+12

There Can Be Only One

Monday, 18 August 2008 8:10 A GMT+12

Search Box

 

Java InetAddress caching...

posted Thursday, 1 July 2004
We just had an issue with one of our java service applications where a client had changed the IP address of one of their domains, yet all our service code remained sending to the old address, a quick search finds mentioned on the InetAddress JavaDoc:
networkaddress.cache.ttl (default: -1)
Indicates 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".
Oh great, so by default java will forever cache looked up IP addresses.

links: digg this    del.icio.us    technorati    reddit




1. a reader left...
Thursday, 1 July 2004 2:31 pm

For a client application, "forever" is probably okay. A server app can configure it, I guess.

Hey, at least it is configurable. :)

(Oh, and thanks for this; I've been wondering how to configure this feature)

Robert Watkins


2. a reader left...
Friday, 2 July 2004 7:10 am

JavaBlogs ha(s|d) this problem. I discovered it for a while when my blog had a proper name, but was on a dynamic ip. I used DynDns, which worked for everything else, but JavaBlogs would never get the new ip when it changed. Very annoying.

Joey Gibson