Skip to content
Permalink
Browse files

Merge pull request #76 from futures/configuration-to-fcrepo-jcr

move various modeshape/infinispan configurations into fcrepo-jcr
  • Loading branch information...
cbeer committed Jun 10, 2013
2 parents 9a53bdc + 15d0105 commit 1a76a7b24a7b4e35136ad3977b7d32eb6bfd42b4
Showing with 491 additions and 675 deletions.
  1. +5 −2 fcrepo-generator-dc/src/test/resources/spring-test/repo.xml
  2. +1 −1 fcrepo-http-api/src/test/resources/test_repository.json
  3. 0 fcrepo-http-commons/src/main/resources/views/sitemap-html.xsl
  4. +41 −0 fcrepo-jcr/src/main/resources/config/async-indexing/repository.json
  5. +2 −3 ...ebapp/src/main/resources/config → fcrepo-jcr/src/main/resources/config/clustered}/repository.json
  6. +2 −2 ...omposite_storage_repository.json → fcrepo-jcr/src/main/resources/config/composite/repository.json
  7. +106 −0 fcrepo-jcr/src/main/resources/config/infinispan/basic/infinispan.xml
  8. 0 ...onfiguration_chained.xml → fcrepo-jcr/src/main/resources/config/infinispan/chained/infinispan.xml
  9. +154 −0 fcrepo-jcr/src/main/resources/config/infinispan/clustered/infinispan.xml
  10. +30 −0 fcrepo-jcr/src/main/resources/config/infinispan/ram/infinispan.xml
  11. +91 −0 fcrepo-jcr/src/main/resources/config/jgroups-fcrepo-tcp.xml
  12. +8 −1 .../test/resources/my_repository.json → fcrepo-jcr/src/main/resources/config/minimal/repository.json
  13. +37 −0 fcrepo-jcr/src/main/resources/config/single/repository.json
  14. +4 −4 ...est/resources/test_repository.json → fcrepo-jcr/src/main/resources/config/testing/repository.json
  15. +0 −91 fcrepo-jms/src/test/resources/infinispan_configuration.xml
  16. +0 −19 fcrepo-jms/src/test/resources/my_repository.json
  17. +1 −1 fcrepo-jms/src/test/resources/spring-test/repo.xml
  18. +4 −4 fcrepo-kernel/src/test/java/org/fcrepo/integration/utils/LowLevelCacheEntryIT.java
  19. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/integration/utils/infinispan/StoreChunkInputStreamIT.java
  20. +1 −1 fcrepo-kernel/src/test/resources/spring-test/repo.xml
  21. +0 −61 fcrepo-kernel/src/test/resources/test_infinispan_configuration.xml
  22. +1 −1 fcrepo-rss/src/test/resources/spring-test/repo.xml
  23. +0 −19 fcrepo-rss/src/test/resources/test_repository.json
  24. +0 −151 fcrepo-webapp/src/main/resources/config/infinispan_configuration.xml
  25. +0 −201 fcrepo-webapp/src/main/resources/config/infinispan_configuration_chained.xml
  26. +0 −91 fcrepo-webapp/src/main/resources/config/jgroups-fcrepo-tcp.xml
  27. +1 −1 fcrepo-webapp/src/main/resources/spring/repo.xml
  28. +1 −1 fcrepo-webhooks/src/test/resources/spring-test/repo.xml
  29. +0 −19 fcrepo-webhooks/src/test/resources/test_repository.json
@@ -10,11 +10,14 @@

<context:annotation-config/>

<context:property-placeholder/>

<bean name="modeshapeRepofactory"
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:my_repository.json}"/>
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean">
<property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:/config/testing/repository.json}"/>
</bean>


<bean class="org.modeshape.jcr.JcrRepositoryFactory"/>

<bean class="org.fcrepo.services.ObjectService"/>
@@ -8,7 +8,7 @@
},
"storage" : {
"cacheName" : "FedoraRepository",
"cacheConfiguration" : "test_infinispan_configuration.xml",
"cacheConfiguration" : "config/infinispan/basic/infinispan.xml",
"binaryStorage" : {
"type" : "cache",
"dataCacheName" : "FedoraRepository",
No changes.
@@ -0,0 +1,41 @@
{
"name" : "repo",
"jndiName" : "",
"workspaces" : {
"predefined" : ["default"],
"default" : "default",
"allowCreation" : true
},
"query" : {
"enabled" : true,
"indexStorage" : {
"type" : "filesystem",
"location" : "${fcrepo.modeshape.index.location:target/indexes}",
"lockingStrategy" : "native",
"fileSystemAccessType" : "auto"
},
"indexing" : {
"mode" : "async"

}
},
"storage" : {
"cacheName" : "FedoraRepository",
"cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:config/infinispan/basic/infinispan.xml}",
"binaryStorage" : {
"type" : "cache",
"dataCacheName" : "FedoraRepositoryBinaryData",
"metadataCacheName" : "FedoraRepository"
}
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
},
"providers" : [
{ "classname" : "servlet" }
]
},
"node-types" : ["fedora-node-types.cnd"]
}
@@ -11,7 +11,6 @@
},
"query" : {
"enabled" : true,
"rebuildUponStartup" : "if_missing",
"indexStorage" : {
"type" : "filesystem",
"location" : "${fcrepo.modeshape.index.location:target/indexes}",
@@ -21,7 +20,7 @@
},
"storage" : {
"cacheName" : "FedoraRepository",
"cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:config/infinispan_configuration.xml}",
"cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:config/infinispan/clustered/infinispan_configuration.xml}",
"binaryStorage" : {
"type" : "cache",
"dataCacheName" : "FedoraRepositoryBinaryData",
@@ -37,5 +36,5 @@
{ "classname" : "servlet" }
]
},
"node-types" : ["fedora-node-types.cnd"]
"node-types" : ["fedora-node-types.cnd"]
}
@@ -8,7 +8,7 @@
},
"storage" : {
"cacheName" : "FedoraRepository",
"cacheConfiguration" : "infinispan_selfhealing_configuration.xml",
"cacheConfiguration" : "config/infinispan/basic/infinispan.xml.xml",
"binaryStorage" : {
"type" : "composite",
"minimumBinarySizeInBytes" : 1,
@@ -33,5 +33,5 @@
{ "classname" : "servlet" }
]
},
"node-types" : ["fedora-node-types.cnd"]
"node-types" : ["fedora-node-types.cnd"]
}
@@ -0,0 +1,106 @@
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd"
xmlns="urn:infinispan:config:5.2">

<global>
<globalJmxStatistics enabled="true" allowDuplicateDomains="true"/>
</global>

<default>
</default>


<namedCache name="FedoraRepository">

<eviction maxEntries="500" strategy="LIRS" threadPolicy="DEFAULT"/>

<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->

<loaders passivation="false" shared="false" preload="false">

<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.CacheDirPath:target/FedoraRepository/storage}"/>

<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>

</loaders>
</namedCache>

<namedCache name="FedoraRepositoryBinaryData">

<eviction maxEntries="100" strategy="LIRS" threadPolicy="DEFAULT"/>

<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->

<loaders passivation="false" shared="false" preload="false">

<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.binary.CacheDirPath:target/FedoraRepositoryBinaryData/storage}"/>

<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>

</loaders>
</namedCache>
</infinispan>
@@ -0,0 +1,154 @@
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd"
xmlns="urn:infinispan:config:5.2">

<global>

<globalJmxStatistics enabled="true" allowDuplicateDomains="true"/>

<!-- Defines the global settings shared by all caches -->
<transport clusterName="modeshape-cluster">
<properties>
<property name="configurationFile" value="${fcrepo.ispn.jgroups.configuration:config/jgroups-fcrepo-tcp.xml}"/>
</properties>
</transport>
</global>

<default>
<!--
Defines the default behavior for all caches, including those created dynamically (e.g., when a
repository uses a cache that doesn't exist in this configuration).
-->
<clustering mode="distribution">
<sync/>
<l1 enabled="false" lifespan="0" onRehash="false"/>
<hash numOwners="${fcrepo.ispn.numOwners:2}"/>
<stateTransfer chunkSize="100" fetchInMemoryState="true"/>
</clustering>
</default>


<namedCache name="FedoraRepository">
<!--
Our Infinispan cache needs to be transactional. However, we'll also configure it to
use pessimistic locking, which is required whenever applications will be concurrently
updating nodes within the same process. If you're not sure, use pessimistic locking.
-->
<clustering mode="replication">
<sync/>
<stateTransfer chunkSize="100" fetchInMemoryState="true"/>
</clustering>

<locking concurrencyLevel="1000" lockAcquisitionTimeout="15000" useLockStriping="false" />

<deadlockDetection enabled="true" spinDuration="1000"/>


<eviction maxEntries="500" strategy="LIRS" threadPolicy="DEFAULT"/>

<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->

<loaders passivation="false" shared="false" preload="false">

<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.CacheDirPath:target/FedoraRepository/storage}"/>

<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>

</loaders>
</namedCache>

<namedCache name="FedoraRepositoryBinaryData">
<!--
Our Infinispan cache needs to be transactional. However, we'll also configure it to
use pessimistic locking, which is required whenever applications will be concurrently
updating nodes within the same process. If you're not sure, use pessimistic locking.
-->
<clustering mode="distribution">
<sync/>
<l1 enabled="false" lifespan="0" onRehash="false"/>
<hash numOwners="${fcrepo.ispn.numOwners:2}" numSegments="40"/>
<stateTransfer chunkSize="100" fetchInMemoryState="true"/>
</clustering>

<locking concurrencyLevel="1000" lockAcquisitionTimeout="15000" useLockStriping="false" />

<deadlockDetection enabled="true" spinDuration="1000"/>


<eviction maxEntries="100" strategy="LIRS" threadPolicy="DEFAULT"/>

<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->

<loaders passivation="false" shared="false" preload="false">

<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.binary.CacheDirPath:target/FedoraRepositoryBinaryData/storage}"/>

<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>

</loaders>
</namedCache>
</infinispan>
Oops, something went wrong.

0 comments on commit 1a76a7b

Please sign in to comment.
You can’t perform that action at this time.