When you mention Java7 vs Java8, are you referring to the JDK version used to build the application, or the JRE on the runtime platform?
If you need to reboot the server to fix the problem, then that sounds more like an OS/platform issue rather than Java application issue.
- Are you confident that the platform's DNS resolvers are acting properly?
- If you use a platform utility like nslookup or dig, do you notice any unusual?
- Can you snoop the network traffic to the resolvers using wireshark or tcdump and see what is happening?
If you are looking-up an SMTP smarthost, shouldn't you only really need to do this once (or very infrequently)? Smarthosts typically wouldn't change their IP addresses often.