java.net.URL Timeouts
If your application uses java.net.URL, and chances it does are very high, and you are using Sun's JVM (since 1.4.2), you should set the
sun.net.client.defaultConnectTimeoutandsun.net.client.defaultReadTimeoutsystem properties to a reasonable value. Otherwise, if a remote site hangs, your application or server will also hang.
Useful to know…

September 4th, 2008 at 11:52 am
To be honest, it sucks. It assumes that you want the same timeout across the board. Rather like their ‘ginger stepchild’ logging implementation. How about modifying the connection object.
You didn’t write Java, I know. This isn’t a dig at you in any way. It just smacks of globals when Java is supposed to be object oriented.