Skip to content

Instantly share code, notes, and snippets.

@escowles
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save escowles/9690612 to your computer and use it in GitHub Desktop.

Select an option

Save escowles/9690612 to your computer and use it in GitHub Desktop.
Working JGroups config
<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"/>
<transport clusterName="modeshape-cluster">
<properties>
<property name="configurationFile" value="${fcrepo.ispn.jgroups.configuration:cluster/jgroups-fcrepo-tcp.xml}"/>
</properties>
</transport>
</global>
<default>
<clustering mode="distribution">
<sync replTimeout="600000"/>
<l1 enabled="false" lifespan="0" onRehash="false"/>
<hash numOwners="${fcrepo.ispn.numOwners:2}"/>
<stateTransfer chunkSize="100" fetchInMemoryState="true"/>
</clustering>
</default>
<namedCache name="FedoraRepository">
<clustering mode="replication">
<sync replTimeout="6000000"/>
<l1 enabled="false" lifespan="0" onRehash="false"/>
<stateTransfer chunkSize="100" fetchInMemoryState="true" timeout="120000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED" writeSkewCheck="false" lockAcquisitionTimeout="150000" useLockStriping="true" />
<transaction transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<loaders passivation="false" shared="false" preload="false">
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<properties>
<property name="location" value="${fcrepo.ispn.repo.CacheDirPath:cluster/data/FedoraRepository/storage}"/>
<property name="fsyncMode" value="perWrite"/>
</properties>
</loader>
</loaders>
</namedCache>
<namedCache name="FedoraRepositoryMetaData">
<clustering mode="distribution">
<sync replTimeout="600000"/>
<l1 enabled="false" lifespan="0" onRehash="false"/>
<hash numOwners="${fcrepo.ispn.numOwners:2}"/>
<stateTransfer chunkSize="100" fetchInMemoryState="true"/>
</clustering>
<locking concurrencyLevel="1000" lockAcquisitionTimeout="150000" 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"/>
<loaders passivation="false" shared="false" preload="false">
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<properties>
<property name="location" value="${fcrepo.ispn.CacheDirPath:cluster/data/FedoraRepositoryMetaData/storage}"/>
<property name="fsyncMode" value="perWrite"/>
</properties>
</loader>
</loaders>
</namedCache>
<namedCache name="FedoraRepositoryBinaryData">
<clustering mode="distribution">
<sync replTimeout="600000"/>
<l1 enabled="false" lifespan="0" onRehash="false"/>
<hash numOwners="${fcrepo.ispn.numOwners:2}"/>
<stateTransfer chunkSize="100" fetchInMemoryState="true"/>
</clustering>
<locking concurrencyLevel="1000" lockAcquisitionTimeout="150000" 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"/>
<loaders passivation="false" shared="false" preload="false">
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<properties>
<property name="location" value="${fcrepo.ispn.binary.CacheDirPath:cluster/data/FedoraRepositoryBinaryData/storage}"/>
<property name="fsyncMode" value="perWrite"/>
</properties>
</loader>
</loaders>
</namedCache>
</infinispan>
<config xmlns="urn:org:jgroups" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-
3.0.xsd">
<TCP
bind_port="7800"
loopback="false"
recv_buf_size="${tcp.recv_buf_size:5M}"
send_buf_size="${tcp.send_buf_size:640K}"
max_bundle_size="64K"
max_bundle_timeout="30"
use_send_queues="true"
sock_conn_timeout="300"
timer_type="new3"
timer.min_threads="4"
timer.max_threads="10"
timer.keep_alive_time="3000"
timer.queue_max_size="500"
thread_pool.enabled="true"
thread_pool.min_threads="1"
thread_pool.max_threads="10"
thread_pool.keep_alive_time="5000"
thread_pool.queue_enabled="true"
thread_pool.queue_max_size="10000"
thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="discard"/>
<MPING timeout="1000"
num_initial_members="1"/>
<MERGE2 max_interval="30000"
min_interval="10000"/>
<FD_ALL timeout="150000"/>
<VERIFY_SUSPECT timeout="150000" />
<BARRIER />
<pbcast.NAKACK2 use_mcast_xmit="false"
discard_delivered_msgs="true"/>
<UNICAST timeout="600,900,2500"/>
<pbcast.STABLE stability_delay="2000" desired_avg_gossip="50000"
max_bytes="4M"/>
<pbcast.GMS print_local_addr="true" join_timeout="6000"
view_bundling="true"/>
<MFC max_credits="2M"
min_threshold="0.4"/>
<FRAG2 frag_size="60K" />
<pbcast.STATE_TRANSFER />
</config>
#!/bin/sh
# JAVA_OPTS: -server -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Xms512m -Xmx4096m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -Dhttp.port=8080
FCREPO=$HOME/fcrepo4
CLUSTER=$HOME/cluster
OPTS="-Djgroups.udp.mcast_addr=239.42.42.42"
OPTS="$OPTS -Dfcrepo.modeshape.configuration=file://$CLUSTER/repository.json"
OPTS="$OPTS -Dfcrepo.ispn.jgroups.configuration=$CLUSTER/jgroups-fcrepo-tcp.xml"
OPTS="$OPTS -Dfcrepo.infinispan.cache_configuration=$CLUSTER/infinispan.xml"
OPTS="$OPTS -Dfcrepo.home=$CLUSTER/data/fcrepo"
cd $FCREPO/fcrepo-webapp && mvn $OPTS jetty:run
{
"name" : "repo",
"jndiName" : "",
"workspaces" : {
"predefined" : ["default"],
"default" : "default",
"allowCreation" : true
},
"clustering" : {
"clusterName" : "modeshape-cluster"
},
"query" : {
"enabled" : "false",
},
"storage" : {
"cacheName" : "FedoraRepository",
"cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:cluster/infinispan.xml}",
"binaryStorage" : {
"type" : "cache",
"dataCacheName" : "FedoraRepositoryBinaryData",
"metadataCacheName" : "FedoraRepositoryMetaData"
}
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
},
"providers" : [
{ "classname" : "org.fcrepo.http.commons.session.BypassSecurityServletAuthenticationProvider" }
]
},
"node-types" : ["fedora-node-types.cnd"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment