Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixed fcrepo-dc so that build works: https://www.pivotaltracker.com/s…
- Loading branch information
Showing
9 changed files
with
273 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<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> | ||
<!-- Defines the global settings shared by all caches --> | ||
<transport> | ||
<properties> | ||
<property name="configurationFile" value="${fcrepo.modeshape.ispn.configuration:jgroups-infinispan.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="1"/> | ||
<stateTransfer 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="distribution"> | ||
<sync/> | ||
<l1 enabled="false" lifespan="0" onRehash="false"/> | ||
<hash numOwners="1"/> | ||
<stateTransfer fetchInMemoryState="true"/> | ||
</clustering> | ||
|
||
<eviction maxEntries="100" strategy="LRU" 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="true"> | ||
|
||
<!-- | ||
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="false" | ||
purgeOnStartup="true"> | ||
<!-- 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="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> | ||
<!-- fall back to other nodes if we don't have this data --> | ||
<loader class="org.infinispan.loaders.cluster.ClusterCacheLoader" | ||
fetchPersistentState="false" purgeOnStartup="false"> | ||
<properties> | ||
<property name="remoteCallTimeout" value="20000"/> | ||
</properties> | ||
|
||
</loader> | ||
</loaders> | ||
</namedCache> | ||
</infinispan> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE configuration> | ||
<configuration> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%p %d{HH:mm:ss.SSS} \(%c{0}\) %m%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<logger name="org.fcrepo" additivity="false" level="DEBUG"> | ||
<appender-ref ref="STDOUT"/> | ||
</logger> | ||
<root additivity="false" level="WARN"> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name" : "repo", | ||
"jndiName" : "", | ||
"workspaces" : { | ||
"predefined" : ["fedora"], | ||
"default" : "fedora", | ||
"allowCreation" : true | ||
}, | ||
"clustering" : { | ||
"clusterName" : "modeshape", | ||
"channelConfiguration" : "${fcrepo.modeshape.jgroups.configuration:jgroups-modeshape.xml}" | ||
}, | ||
"query" : { | ||
"enabled" : true, | ||
"rebuildUponStartup" : "if_missing", | ||
"indexStorage" : { | ||
"type" : "filesystem", | ||
"location" : "${fcrepo.modeshape.index.location:indexes}", | ||
"lockingStrategy" : "native", | ||
"fileSystemAccessType" : "auto" | ||
} | ||
}, | ||
"storage" : { | ||
"cacheName" : "FedoraRepository", | ||
"cacheConfiguration" : "infinispan_configuration.xml", | ||
"binaryStorage" : { | ||
"type" : "cache", | ||
"dataCacheName" : "FedoraRepository", | ||
"metadataCacheName" : "FedoraRepository" | ||
} | ||
}, | ||
"security" : { | ||
"anonymous" : { | ||
"roles" : ["readonly","readwrite","admin"], | ||
"useOnFailedLogin" : false | ||
}, | ||
"providers" : [ | ||
{ "classname" : "servlet" } | ||
] | ||
}, | ||
"node-types" : ["fedora-node-types.cnd"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<!-- Context that supports the actual ModeShape JCR itself --> | ||
|
||
<context:annotation-config/> | ||
|
||
<bean name="modeshapeRepofactory" | ||
class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/> | ||
|
||
<bean class="org.modeshape.jcr.JcrRepositoryFactory"/> | ||
|
||
<bean class="org.springframework.core.io.ClassPathResource"> | ||
<qualifier type="ModeShapeRepositoryConfiguration"/> | ||
<constructor-arg type="String" value="my_repository.json"/> | ||
</bean> | ||
|
||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters