JBoss Community Archive (Read Only)

ModeShape 5

Journaling

Overview

ModeShape offers the ability to store for each repository a local journal of all the events that occurred within the repository.

The journal itself is not exposed to clients directly, but needs to be enabled in order to support other features like:

  • JCR Journaled Observation

  • rebuilding indexes from a point in time

Configuration

In order to enable journaling you need to at least define a location for it in the JSON configuration:

"journaling" : {
        "location" : "target/journal"
}

There are several other attributes which can be configured as well:

Attribute name

Default value

Description

location

 

A mandatory attribute representing the location on the file system where the data should be stored

maxDaysToKeepRecords

-1

The number of days to keep records. By default -1, meaning records will be kept indefinitely. In large system however, this may be impractical as it may cause the jornal to grow significantly in size.

threadPool

modeshape-journaling-gc

The name of the repository thread which will cleanup older journal entries. Only used if maxDaysToKeepRecords is not -1.

initialTime

00:00

The local time (hours:minutes) at which the cleanup thread should be run. Only used if maxDaysToKeepRecords is not -1.

intervalInHours

24

The interval (in hours) at which the cleanup thread should be run. Only used if maxDaysToKeepRecords is not -1.

asyncWritesEnabled

false

Whether writes to the journal should be asynchronous or not.

enabled

true

Whether the journal is active or not

A fully configured journal would look similar to:

 "journaling" : {
        "location" : "target/journal",
        "maxDaysToKeepRecords" : 15,
        "asyncWritesEnabled" : false,
        "threadPool" : "modeshape-journaling-gc",
        "initialTime" : "04:01",
        "intervalInHours" : 5,
        "enabled" : true
    }

The journaling functionality is also integrated, configuration wise, into the WildFly subsystem. To enable it, one has to at least configure it like so:

<journaling/>

By default, the location of the records is: jboss.server.data.dir/modeshape/repositoryName/journal.

A fully configured journal would have the same attributes from above:

<journaling max-days-to-keep-records="" async-writes="" journal-path="" journal-relative-to="" journal-gc-initial-time="" journal-gc-thread-pool="" enabled="true"/>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:12:33 UTC, last content change 2016-04-05 07:18:39 UTC.