Basic Modeshape config
singhl1 May 13, 2013 8:37 AMI am very new to modeshape 3.1, and my requirement is to store files to a Modeshape repository, my configuration will be a Web App on Tomcat 6 with Spring 3 and MS SQL database.
I am a little confused about transactions and the need for a database, do I still need a database if my content is all to be stored on a file system?
My json cofig is:
{
"name": "Repository",
"jndiName": "",
"workspaces": {
"predefined": ["defaultWorkspace"],
"default": "defaultWorkspace",
"allowCreation": true
},
"security": {
"anonymous": {
"roles": ["readonly", "readwrite", "admin"],
"useOnFailedLogin": false
}
},
"storage": {
"cacheConfiguration": "infinispan-configuration.xml",
"cacheName": "isisRepository",
"binaryStorage": {
"type": "file",
"directory": "/isis-repo/ModeShape"
}
},
"query": {
"enabled": true,
"enableFullTextSearch": true,
"rebuildUponStartup": "if_missing",
"indexStorage": {
"type": "ram"
},
"textExtracting": {
"extractors": {
"tikaExtractor": {
"name": "Tika content-based extractor",
"classname": "tika"
}
}
}
},
"sequencing": {
"removeDerivedContentWithOriginal": true,
"sequencers": {
"Images in separate location": {
"classname": "ImageSequencer",
"pathExpression": "defaultWorkspace://(*.(gif|png|pict|jpg))/jcr:content[@jcr:data] => defaultWorkspace:/sequenced/images"
},
"Images in the same location": {
"classname": "org.modeshape.sequencer.image.ImageMetadataSequencer",
"pathExpressions": ["defaultWorkspace://(*.(gif|png|pict|jpg))/jcr:content[@jcr:data]"]
}
}
}
}
My infinispan config is:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global>
<globalJmxStatistics enabled="false" allowDuplicateDomains="true"/>
</global>
<default>
</default>
<namedCache name="iRepository">
<loaders passivation="false" shared="false" preload="false">
<loader class="org.infinispan.loaders.file.FileCacheStore"
fetchPersistentState="false" purgeOnStartup="false">
<properties>
<property name="location" value="/isis-repo/ModeShape/content" />
</properties>
</loader>
</loaders>
<transaction
transactionMode="NON_TRANSACTIONAL" />
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
lockingMode="OPTIMISTIC"
</namedCache>
</infinispan>
I have tired various configs for the transaction part, but cannot get it to work, any help greatly appreciated, especially trying to get the config to work with spring and tomcat.