Best Practices for Resolving java.net.UnknownHostException