{ "name": "Test repository", "storage": { "persistence" : { "type" : "file", "path": "target/persistent_repository" } } }
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
The persistent store can be easily configured like so:
{ "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:
{ "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
If you're using the JBoss AS kit, you configure the file system persistence like so:
<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:
<repository name="artifacts" anonymous-roles="admin" > <file-persistence path="${jboss.server.data.dir}/modeshape/store/artifacts"/> </repository>
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 |