String message = ex.getMessage();
// http://bugs.sun.com/view_bug.do?bug_id=5103988
if (message != null && message.equalsIgnoreCase("Resource temporarily unavailable")) {
try {
fc.wait(1000);
} catch (InterruptedException e) {
LOGGER.trace(e.getMessage(), e);
}
LOGGER.warn("Experiencing NIO issue http://bugs.sun.com/view_bug.do?bug_id=5103988. Retrying");
continue;