JBoss Community Archive (Read Only)

ModeShape 5

File System persistence

Stores all repository data on disk, in a configured location using H2's MVStore API.

Users coming from ModeShape 3 and 4 which had their data stored anywhere except in a relational DB should opt for this store.

This store cannot be used when clustering

Configuration

JSON

The persistent store can be easily configured like so:

JSON configuration
{
    "name": "Test repository",
    "storage": {
        "persistence" : {
            "type" : "file",
            "path": "target/persistent_repository"
        } 
    }
}

and will store data in the target/persistent_repository/modeshape.repository file relative to the current running directory of the JVM. You can also use an absolute path with or without the help of environment variables. For example:

JSON configuration
{
    "name": "Test repository",
    "storage": {
        "persistence" : {
            "type" : "file",
            "path": "{java.io.tmpdir}/modeshape"
        } 
    }
}

will store the data in a file called modeshape.repository inside the value of the folder ${java.io.tmpdir}/modeshape

JBoss AS

If you're using the JBoss AS kit, you configure the file system persistence like so:

JBoss AS configuration
 <repository name="sample" anonymous-roles="admin">
    <file-persistence/>
 </repository>

which will store the data in the default location of ${jboss.server.data.dir}/modeshape/<repositoryName>/modeshape.repository

or you can explicitly define the place where to store the data:

JBoss AS configuration
  <repository name="artifacts" anonymous-roles="admin" >
     <file-persistence path="${jboss.server.data.dir}/modeshape/store/artifacts"/>
  </repository>

Attributes

The list of attributes supported by this store is:

Name

Required

Configuration

Description

path

yes (for the JSON config)

JSON and JBoss AS

the path on disk where the repository data should be stored

compress

no

JSON and JBoss AS

whether store data should be compressed or not. Defaults to true

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:12:42 UTC, last content change 2016-04-05 09:33:05 UTC.