I tried to explain my question here JVM appears to cache failed DNS lookups even if caching is "disabled", but now I would like to formulate it better. Basically we are running Java code on small ARM based device running Angstrom Linux (but the same behaviour is on RHEL6).
If I run the code having network cable unplugged, and then plug the cable after some time, the program is simply blocked and never "recognizes" the changes on the network, i.e. network service we are using is always unsuccessfull, although pinging for example google from another terminal works at that moment. The program sometimes even get blocked, so no Exception is caught. Somehow it is stuck somewhere.
I tried tuning internal values such as networkaddress.cache.ttl and networkaddress.cache.negative.ttl but nothing has changed. It is obvious that the problem is in lower layers and somewhere in communication between OS and JVM. Is there any way to do some flushing, refreshing, etc, ... whatsoever.
What I basically want at the end is to have JVM follows OS in network settings.