Created
February 4, 2014 14:11
-
-
Save lonelydimple/8804302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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