Skip to content

Instantly share code, notes, and snippets.

@lonelydimple
Created February 4, 2014 14:11
Show Gist options
  • Save lonelydimple/8804302 to your computer and use it in GitHub Desktop.
Save lonelydimple/8804302 to your computer and use it in GitHub Desktop.
public class DocumentWriter {
public static void save(Document document) throws NotesException, DocumentSaveException {
try {
boolean result = document.save(false, false, true);
if (!result) {
TimeUnit.SECONDS.sleep(2);
result = document.save(false, false, true);
if (!result) {
throw new DocumentSaveException("Could not save document");
}
}
} catch (InterruptedException interruption) {
interruption.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment