// Set up the event journal
RepositoryConfiguration.Journaling journaling = config.getJournaling();
if (journaling.isEnabled()) {
boolean asyncWritesEnabled = journaling.asyncWritesEnabled();
LocalJournal localJournal = new LocalJournal(journaling.location(), asyncWritesEnabled,
journaling.maxDaysToKeepRecords());
this.journal = clusteringService != null ? new ClusteredJournal(localJournal, clusteringService) : localJournal;
this.journal.start();
if (asyncWritesEnabled) {
// Register the journal as a normal asynchronous listener ...