* @throws IOException
*/
protected void createJournal() throws IOException {
File journalDir = new File(getDataDirectoryFile(), "journal").getCanonicalFile();
if (failIfJournalIsLocked) {
journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
getJournalArchiveDirectory());
} else {
while (true) {
try {
journal = new JournalImpl(journalDir, journalLogFiles, journalLogFileSize,
getJournalArchiveDirectory());
break;
} catch (JournalLockedException e) {
LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
+ " seconds for the journal to be unlocked.");