My application calls web services provided by a partner system using URL, HTTPUrlConnect, etc. Yesterday this partner failed over to a backup server. They do this by changing the DNS entry to point to a new IP address. Unfortunately, the InetAddress class caches IP addresses so we did not pick up the change, and kept trying to hit the dead server.
The docs say caching helps avoid DNS spoofing. My system and the partners are all on a private internal network, so I'm not to worried about that. I think.
There is a system property that controls caching. We could set a cache "time to live" property to 0 meaning "never cache".
Anybody know if this is a good idea?
BTW: We're on JRE 1.3.1 in WebSphere 5.02.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi