Author: nfilotto
Date: 2012-01-31 10:59:04 -0500 (Tue, 31 Jan 2012)
New Revision: 5546
Added:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml
jcr/trunk/pom.xml
Log:
EXOJCR-1682: Upgrade to ISPN 5.1.0.FINAL and JGroups 3.0.3.Final, cache server scripts and
build and related doc (jcr)
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd
(rev 0)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.cmd 2012-01-31
15:59:04 UTC (rev 5546)
@@ -0,0 +1 @@
+java -Djava.net.preferIPv4Stack=true -Xms128m -Xmx512m -jar
exo.jcr.component.core.impl.infinispan.v5-binary.jar %*
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
(rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh 2012-01-31
15:59:04 UTC (rev 5546)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -Djava.net.preferIPv4Stack=true -Xms128m -Xmx512m -jar
exo.jcr.component.core.impl.infinispan.v5-binary.jar $*
Property changes on:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/bin/startCacheServer.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2012-01-31 15:51:04 UTC
(rev 5545)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2012-01-31 15:59:04 UTC
(rev 5546)
@@ -43,9 +43,9 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.exoplatform.ws</groupId>
- <artifactId>exo.ws.commons</artifactId>
- <scope>test</scope>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.commons</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -55,7 +55,7 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons.test</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.ext.rpc.impl.jgroups.v3</artifactId>
@@ -72,8 +72,8 @@
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
</exclusion>
- </exclusions>
- </dependency>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.component.core</artifactId>
@@ -85,7 +85,7 @@
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
</exclusion>
- </exclusions>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
@@ -114,20 +114,20 @@
<artifactId>jgroups</artifactId>
</exclusion>
</exclusions>
- </dependency>
+ </dependency>
<!-- TCK binaries and deps for repo stub, some eXo API test -->
<dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-core</artifactId>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-core</artifactId>
</dependency>
<dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-cachestore-jdbc</artifactId>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-cachestore-jdbc</artifactId>
</dependency>
<dependency>
- <groupId>javax.resource</groupId>
- <artifactId>connector-api</artifactId>
- <scope>test</scope>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector-api</artifactId>
+ <scope>test</scope>
</dependency>
<!-- ===== Databases JDBC support for tests ===== -->
<dependency>
@@ -135,8 +135,8 @@
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>
- </dependencies>
- <!-- ======================================================================= -->
+ </dependencies>
+ <!-- =======================================================================
-->
<build>
<resources>
<resource>
@@ -186,7 +186,7 @@
<property>
<name>cache-enabled</name>
<value>${cache.enabled}</value>
- </property>
+ </property>
<property>
<name>value-storage-enabled</name>
<value>${value.storage.enabled}</value>
@@ -196,20 +196,19 @@
<value>${use.distributed.cache}</value>
</property>
<property>
-
<name>JDBCWorkspaceDataContainer.statistics.enabled</name>
- <value>${statistics.enabled}</value>
+
<name>JDBCWorkspaceDataContainer.statistics.enabled</name>
+ <value>${statistics.enabled}</value>
</property>
<property>
- <name>exo.properties.url</name>
-
<value>${properties.url.prefix}${properties.url.suffix}</value>
+ <name>exo.properties.url</name>
+
<value>${properties.url.prefix}${properties.url.suffix}</value>
</property>
- <!-- We add this system property due to some incompatibility between
IPv6 and
- some JVM of Linux distributions such as Ubuntu and Fedora-->
+ <!-- We add this system property due to some incompatibility between
IPv6 and some JVM of Linux distributions such as Ubuntu and Fedora -->
<property>
<name>java.net.preferIPv4Stack</name>
<value>true</value>
</property>
- <!-- Avoid the firewall -->
+ <!-- Avoid the firewall -->
<property>
<name>jgroups.bind_addr</name>
<value>127.0.0.1</value>
@@ -232,8 +231,8 @@
</excludes>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
@@ -257,14 +256,14 @@
<classifier>sources</classifier>
<type>jar</type>
<overWrite>false</overWrite>
- </artifactItem>
+ </artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/jcr-core-tests</outputDirectory>
</configuration>
</execution>
</executions>
- </plugin>
- <plugin>
+ </plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -286,7 +285,7 @@
<filter token="TEST_CLASSES"
value="${testOutputDirectoryURL}" />
</filterset>
</copy>
- </tasks>
+ </tasks>
</configuration>
<goals>
<goal>run</goal>
@@ -340,13 +339,50 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jar-with-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <primaryArtifact>false</primaryArtifact>
+ <finalName>${project.artifactId}</finalName>
+ <descriptors>
+
<descriptor>${basedir}/src/main/assemblies/binary-assembly.xml</descriptor>
+ </descriptors>
+ <archive>
+ <manifest>
+
<mainClass>org.exoplatform.services.jcr.infinispan.CacheServer</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </execution>
+ <execution>
+ <id>bundle</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+
<descriptor>${basedir}/src/main/assemblies/zip-bundle-assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
- <!-- *** -->
- <!-- TCK -->
- <!-- *** -->
- <!-- Use "mvn -Prun-tck" to launch only them -->
+ <!-- *** -->
+ <!-- TCK -->
+ <!-- *** -->
+ <!-- Use "mvn -Prun-tck" to launch only them -->
<profile>
<id>run-tck</id>
<build>
@@ -365,11 +401,11 @@
<property>
<name>emma.coverage.out.file</name>
<value>target/emma/coverage.ec</value>
- </property>
+ </property>
<property>
<name>cache-enabled</name>
<value>${cache.enabled}</value>
- </property>
+ </property>
<property>
<name>value-storage-enabled</name>
<value>${value.storage.enabled}</value>
@@ -378,7 +414,7 @@
<name>use-distributed-cache</name>
<value>${use.distributed.cache}</value>
</property>
- <property>
+ <property>
<name>known.issues</name>
<value>org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreName
org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreOrder2
@@ -400,7 +436,7 @@
<name>java.net.preferIPv4Stack</name>
<value>true</value>
</property>
- <!-- Avoid the firewall -->
+ <!-- Avoid the firewall -->
<property>
<name>jgroups.bind_addr</name>
<value>127.0.0.1</value>
@@ -425,10 +461,10 @@
</plugins>
</build>
</profile>
- <!-- *** -->
- <!-- ALL -->
- <!-- *** -->
- <!-- Use "mvn -Prun-all" to launch default tests and TCK -->
+ <!-- *** -->
+ <!-- ALL -->
+ <!-- *** -->
+ <!-- Use "mvn -Prun-all" to launch default tests and TCK -->
<profile>
<id>run-all</id>
<build>
@@ -438,6 +474,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- TAKE CARE TO UPDATE ALSO run-tck PROFILE -->
+<!-- <argLine>${env.MAVEN_OPTS}
-Dcom.arjuna.ats.arjuna.objectstore.objectStoreDir=${project.build.directory}
-Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager
-Djava.security.policy=${project.build.directory}/test-classes/test.policy -Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y</argLine> -->
<argLine>${env.MAVEN_OPTS}
-Dcom.arjuna.ats.arjuna.objectstore.objectStoreDir=${project.build.directory}
-Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager
-Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
<systemProperties>
<property>
@@ -447,15 +484,15 @@
<property>
<name>emma.coverage.out.file</name>
<value>target/emma/coverage.ec</value>
- </property>
+ </property>
<property>
- <name>cache-enabled</name>
- <value>${cache.enabled}</value>
- </property>
+ <name>cache-enabled</name>
+ <value>${cache.enabled}</value>
+ </property>
<property>
- <name>value-storage-enabled</name>
- <value>${value.storage.enabled}</value>
- </property>
+ <name>value-storage-enabled</name>
+ <value>${value.storage.enabled}</value>
+ </property>
<property>
<name>use-distributed-cache</name>
<value>${use.distributed.cache}</value>
@@ -482,7 +519,7 @@
<name>java.net.preferIPv4Stack</name>
<value>true</value>
</property>
- <!-- Avoid the firewall -->
+ <!-- Avoid the firewall -->
<property>
<name>jgroups.bind_addr</name>
<value>127.0.0.1</value>
@@ -580,7 +617,7 @@
<scope>test</scope>
</dependency>
</dependencies>
- </profile>
+ </profile>
<profile>
<id>mysql-5.0</id>
<properties>
@@ -654,7 +691,7 @@
<artifactId>db2jcc_license_cu</artifactId>
<version>9.7</version>
<scope>test</scope>
- </dependency>
+ </dependency>
</dependencies>
</profile>
<profile>
@@ -732,12 +769,12 @@
<jcr.test.configuration.file>/conf/standalone/test-configuration-sjdbc.xml</jcr.test.configuration.file>
<properties.url.suffix>-sjdbc.properties</properties.url.suffix>
</properties>
- </profile>
+ </profile>
<profile>
<id>cluster</id>
<properties>
<jcr.test.configuration.file>/conf/standalone/cluster/test-configuration.xml</jcr.test.configuration.file>
</properties>
- </profile>
+ </profile>
</profiles>
</project>
Added:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml
(rev 0)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/binary-assembly.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -0,0 +1,70 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembl...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-p...
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>binary</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
+ <outputDirectory>/</outputDirectory>
+ <unpack>true</unpack>
+ <excludes>
+ <exclude>org.jboss.cache:jbosscache-core</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>javax.servlet:servlet-api</exclude>
+ <exclude>javax.faces:jsf-api</exclude>
+ <exclude>javax.portlet:portlet-api</exclude>
+ <exclude>jmock:jmock</exclude>
+ <exclude>org.ow2.jotm:*</exclude>
+ <exclude>xdoclet:*</exclude>
+ <exclude>org.exoplatform.tool:exo.tool.framework.junit</exclude>
+ <exclude>org.ow2.carol:*</exclude>
+ <exclude>org.ow2.carol.irmi:irmi</exclude>
+ <exclude>org.ow2.spec.ee:ow2-jta-1.1-spec</exclude>
+ <exclude>org.jacorb:*</exclude>
+ <exclude>quartz:quartz</exclude>
+ <exclude>javax.mail:mail</exclude>
+ <exclude>com.experlog:xapool</exclude>
+ <exclude>antlr:antlr</exclude>
+ <exclude>avalon-framework:avalon-framework</exclude>
+ <exclude>logkit:logkit</exclude>
+ <exclude>org.objectweb.howl:howl</exclude>
+ <exclude>org.jboss.javaee:jboss-transaction-api</exclude>
+ <exclude>org.jboss:jboss-common-core</exclude>
+ <exclude>org.hibernate:*</exclude>
+ </excludes>
+ </dependencySet>
+ <dependencySet>
+
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
+ <outputDirectory>/</outputDirectory>
+ <scope>test</scope>
+ <unpack>true</unpack>
+ <includes>
+ <include>org.slf4j:slf4j-log4j12</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+</assembly>
\ No newline at end of file
Added:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml
(rev 0)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/assemblies/zip-bundle-assembly.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -0,0 +1,49 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembl...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-p...
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bundle</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <files>
+ <file>
+ <source>target/${project.artifactId}-binary.jar</source>
+ <destName>${project.artifactId}-binary.jar</destName>
+ </file>
+ <file>
+ <source>${basedir}/src/main/doc/readme.txt</source>
+ <destName>readme.txt</destName>
+ </file>
+ </files>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/bin</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.cmd</include>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt
(rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/doc/readme.txt 2012-01-31
15:59:04 UTC (rev 5546)
@@ -0,0 +1,18 @@
+To launch the cache server the script corresponding to your OS startCacheServer.cmd on
windows
+environment and startCacheServer.sh on unix/linux/macos environments followed by the next
optional arguments:
+
+help|?|<configuration-file-path>|udp|tcp <initial-hosts>
+
+ help : Print the expected syntax.
+ ? : Print the expected syntax.
+ configuration-file-path : The location of the configuration file to use, we
expect an absolute path. It will try to get it using the current class loader,
+ if it cannot be found it will get it from the
file system. By default it will use the path /conf/cache-server-configuration.xml
+ that is actually a file bundled into the jar.
+ udp : We use this parameter value when we want to use
the default configuration file with udp as transport stack which is actually
+ the default stack used which means that it will
have the exact same behavior as when we don't provide any parameter.
+ tcp : We use this parameter value when we want to use
the default configuration file with tcp as transport stack.
+ initial-hosts : This parameter is optional and is only allowed in
case the tcp stack is enabled, it will allow you to define the set of
+ hosts that will be part of the cluster. The
syntax of this parameter is a list of hostname[port] comma-separated.
+ Knowing that the default value is
"localhost[7800],localhost[7801]" if this parameter is not set, the bind address
will be
+ automatically set to 127.0.0.1.
+
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/CacheServer.java 2012-01-31
15:59:04 UTC (rev 5546)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.infinispan;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.container.StandaloneContainer;
import java.net.URL;
@@ -43,6 +44,21 @@
private static final String DEFAULT_CONFIG_FILE_PATH =
"/conf/cache-server-configuration.xml";
+ private static void help(String errorMessage)
+ {
+ StringBuilder sb = new StringBuilder();
+ if (errorMessage != null)
+ {
+ sb.append(errorMessage + ", t");
+ }
+ else
+ {
+ sb.append("T");
+ }
+ sb.append("he expected arguments are:
help|?|<configuration-file-path>|udp|tcp <initial-hosts>");
+ System.err.println(sb.toString());//NOSONAR
+ }
+
/**
* @param args
*/
@@ -52,18 +68,55 @@
if (args == null || args.length == 0)
{
configPath = DEFAULT_CONFIG_FILE_PATH;
- System.out.println("The configuration file will be loaded from '"
+ DEFAULT_CONFIG_FILE_PATH + "'");//NOSONAR
}
else if (args.length == 1)
{
- configPath = args[0];
- System.out.println("The configuration file will be loaded from '"
+ args[0] + "'");//NOSONAR
+ String arg = args[0];
+ if ("help".equals(arg) || "?".equals(arg))
+ {
+ help(null);
+ return;
+ }
+ else if ("udp".equals(arg))
+ {
+ configPath = DEFAULT_CONFIG_FILE_PATH;
+ }
+ else if ("tcp".equals(arg))
+ {
+ configPath = DEFAULT_CONFIG_FILE_PATH;
+ addTCP2ProfileList();
+ PropertyManager.setProperty("jgroups.bind_addr",
"127.0.0.1");
+ System.out.println("No initial hosts have been configured so the bind
address "//NOSONAR
+ + "has been automatically set to 127.0.0.1 assuming that it has been
properly"
+ + " configured to map to localhost");
+ }
+ else
+ {
+ configPath = arg;
+ }
}
+ else if (args.length == 2)
+ {
+ String arg = args[0];
+ if ("tcp".equals(arg))
+ {
+ configPath = DEFAULT_CONFIG_FILE_PATH;
+ addTCP2ProfileList();
+ PropertyManager.setProperty("jgroups.tcpping.initial_hosts",
args[1]);
+ System.out.println("The initial hosts have been configured to:" +
args[1]);//NOSONAR
+ }
+ else
+ {
+ help("Unexpected syntax");
+ return;
+ }
+ }
else
{
- System.err.println("Too many arguments, the expected syntax is: java
CacheServer <configuration-file-path>");//NOSONAR
+ help("Too many arguments");
return;
}
+ System.out.println("The configuration file will be loaded from '" +
configPath + "'");//NOSONAR
URL configUrl = CacheServer.class.getResource(configPath);
if (configUrl != null)
@@ -77,4 +130,18 @@
StandaloneContainer.getInstance();
}
+ private static void addTCP2ProfileList()
+ {
+ String profiles = PropertyManager.getProperty(PropertyManager.RUNTIME_PROFILES);
+ StringBuilder sb = new StringBuilder();
+ if (profiles != null && !profiles.isEmpty())
+ {
+ sb.append(profiles);
+ sb.append(',');
+ }
+ sb.append("tcp");
+ PropertyManager.setProperty(PropertyManager.RUNTIME_PROFILES, sb.toString());
+ System.out.println("The tcp stack has been enabled");//NOSONAR
+ }
+
}
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2012-01-31
15:59:04 UTC (rev 5546)
@@ -35,13 +35,10 @@
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
import org.infinispan.configuration.parsing.Parser;
-import org.infinispan.distribution.ch.ConsistentHash;
-import org.infinispan.distribution.ch.DefaultConsistentHash;
import org.infinispan.jmx.MBeanServerLookup;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.transaction.lookup.TransactionManagerLookup;
-import org.infinispan.util.Util;
import java.io.IOException;
import java.io.InputStream;
@@ -239,15 +236,6 @@
};
confBuilder.transaction().transactionManagerLookup(tml);
}
- //TODO remove it once ISPN-1687 will be fixed
- confBuilder.storeAsBinary().enabled(false);
- //TODO remove it once ISPN-1689 will be fixed
- confBuilder
- .clustering()
- .hash()
- .consistentHash(
- Util.<ConsistentHash>
getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
- .getContextClassLoader()));
Configuration conf = holder.getDefaultConfigurationBuilder().build();
// Define the configuration of the cache
manager.defineConfiguration(regionId, conf);
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/cache-server-configuration.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -28,6 +28,18 @@
<name>infinispan-configuration</name>
<value>jar:/conf/distributed-cache-configuration.xml</value>
</value-param>
+ <properties-param>
+ <name>parameters</name>
+ <description>The parameters of the configuration</description>
+ <property name="configurationFile"
value="udp-mux.xml"></property>
+ <property name="invalidationThreshold"
value="0"></property>
+ </properties-param>
+ <properties-param profiles="tcp">
+ <name>parameters</name>
+ <description>The parameters of the configuration</description>
+ <property name="configurationFile"
value="tcp-mux.xml"></property>
+ <property name="invalidationThreshold"
value="-1"></property>
+ </properties-param>
</init-params>
</component>
<component>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/distributed-cache-configuration.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -25,21 +25,21 @@
<globalJmxStatistics jmxDomain="exo" enabled="true"
allowDuplicateDomains="true"/>
<transport
transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"
clusterName="JCR-cluster" distributedSyncTimeout="20000">
<properties>
- <property name="configurationFile"
value="tcp-mux.xml"/>
+ <property name="configurationFile"
value="${configurationFile}"/>
</properties>
</transport>
<shutdown hookBehavior="DEFAULT"/>
</global>
<namedCache name="JCRCache">
- <locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="true" />
+ <locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="120000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="true" />
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"
eagerLockSingleNode="true" transactionMode="TRANSACTIONAL"/>
<jmxStatistics enabled="true"/>
<clustering mode="distribution">
- <l1 enabled="true" invalidationThreshold="-1"/>
+ <l1 enabled="true"
invalidationThreshold="${invalidationThreshold}"/>
<hash numOwners="2" rehashRpcTimeout="120000">
<groups enabled="true"/>
</hash>
- <sync/>
+ <sync replTimeout="180000"/>
</clustering>
</namedCache>
</infinispan>
\ No newline at end of file
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"
/>
<sync replTimeout="20000"/>
</clustering>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"
/>
<sync replTimeout="20000"/>
</clustering>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"
/>
<sync replTimeout="20000"/>
</clustering>
@@ -52,7 +52,7 @@
<eviction strategy="NONE"/>
<loaders passivation="false" shared="true"
preload="true">
- <loader
class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
fetchPersistentState="false" ignoreModifications="false"
purgeOnStartup="false">
+ <loader
class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgeOnStartup="false">
<properties>
<property name="stringsTableNamePrefix"
value="${infinispan-cl-cache.jdbc.table.name}"/>
<property name="idColumnName"
value="${infinispan-cl-cache.jdbc.id.column}"/>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/distributed-cache-configuration.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -31,7 +31,7 @@
<shutdown hookBehavior="DEFAULT"/>
</global>
<namedCache name="JCRCache">
- <locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="true" />
+ <locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="120000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="true" />
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"
eagerLockSingleNode="true" transactionMode="TRANSACTIONAL"/>
<jmxStatistics enabled="true"/>
<clustering mode="distribution">
@@ -39,7 +39,7 @@
<hash numOwners="2" rehashRpcTimeout="120000">
<groups enabled="true"/>
</hash>
- <sync replTimeout="60000"/>
+ <sync replTimeout="180000"/>
</clustering>
</namedCache>
</infinispan>
\ No newline at end of file
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"
/>
<sync replTimeout="20000"/>
</clustering>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"
/>
<sync replTimeout="20000"/>
</clustering>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -42,7 +42,7 @@
<default>
<clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+ <stateTransfer timeout="20000" fetchInMemoryState="false"
/>
<sync replTimeout="20000"/>
</clustering>
@@ -52,7 +52,7 @@
<eviction strategy="NONE"/>
<loaders passivation="false" shared="true"
preload="true">
- <loader
class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
fetchPersistentState="false" ignoreModifications="false"
purgeOnStartup="false">
+ <loader
class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgeOnStartup="false">
<properties>
<property name="stringsTableNamePrefix"
value="${infinispan-cl-cache.jdbc.table.name}"/>
<property name="idColumnName"
value="${infinispan-cl-cache.jdbc.id.column}"/>
Modified:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -41,7 +41,7 @@
<eviction strategy="NONE"/>
<loaders passivation="false" shared="true"
preload="true">
- <loader
class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
fetchPersistentState="false" ignoreModifications="false"
purgeOnStartup="false">
+ <loader
class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgeOnStartup="false">
<properties>
<property name="stringsTableNamePrefix"
value="${infinispan-cl-cache.jdbc.table.name}"/>
<property name="idColumnName"
value="${infinispan-cl-cache.jdbc.id.column}"/>
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml
===================================================================
---
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml 2012-01-31
15:51:04 UTC (rev 5545)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/cache.xml 2012-01-31
15:59:04 UTC (rev 5546)
@@ -1347,8 +1347,8 @@
be very generic.</para>
<note>
- <para>All the cache instances that will rely on this cache
- configuration will share the same
+ <para>All the cache instances fo which we configure the same cluster
+ name will also share the same
<envar>EmbeddedCacheManager.</envar></para>
</note>
</section>
@@ -1419,11 +1419,12 @@
/**
* Creates an eXo cache according to the given configuration {@link
org.exoplatform.services.cache.ExoCacheConfig}
* @param config the configuration of the cache to apply
- * @param cacheConfig the configuration of the infinispan cache
+ * @param confBuilder the configuration builder of the infinispan cache
* @param cacheGetter a {@link Callable} instance from which we can get the cache
* @exception ExoCacheInitException if an exception happens while initializing the
cache
*/
- public ExoCache<Serializable, Object> create(ExoCacheConfig config,
Configuration cacheConfig, Callable<Cache<Serializable,
Object>> cacheGetter) throws ExoCacheInitException;
+ public ExoCache<Serializable, Object> create(ExoCacheConfig config,
ConfigurationBuilder confBuilder,
+ Callable<Cache<Serializable, Object>>
cacheGetter) throws ExoCacheInitException;
/**
* Returns the type of {@link org.exoplatform.services.cache.ExoCacheConfig} expected
by the creator
@@ -1612,18 +1613,25 @@
<title>Define an infinispan cache instance</title>
<section>
- <title>How to define a distributed or a local cache?</title>
+ <title>How to define a replicated, a distributed or a local
+ cache?</title>
<para>Actually, if you use a custom configuration for your cache as
described in a previous section, we will use the cache mode define in
your configuration file.</para>
<para>In case, you decide to use the default configuration template,
- we use the field <emphasis>distributed</emphasis> of your
- <envar>ExoCacheConfig</envar> to decide. In other words, if the
value
- of this field is false (the default value), the cache will be a local
- cache otherwise it will be the cache mode defined in your default
- configuration template that should be distributed.</para>
+ we use the fields <emphasis>distributed</emphasis> and
+ <emphasis>replicated</emphasis> of your
<envar>ExoCacheConfig</envar>
+ to decide. In other words, if the value of these fields is false (the
+ default value), the cache will be a local cache otherwise if the field
+ <emphasis>distributed</emphasis> is set to true, the cache will be
+ then be considered as distrbuted and will be retrieved from the
+ <emphasis>DistributedCacheManager</emphasis> (more details about it
in
+ the next chapter). Finally if the field
+ <emphasis>replicated</emphasis> is set to true, the cache mode of
your
+ cache will be the one defined in the configuration assuming that it
+ should be replicated.</para>
</section>
<section>
@@ -1763,5 +1771,201 @@
</note></para>
</section>
</section>
+
+ <section>
+ <title>Using Infinispan in distributed mode</title>
+
+ <para>In order to be able to use infinispan in distributed mode with the
+ ability to launch external JVM instances that will manage a part of the
+ cache, we need to configure the
+ <emphasis>DistributedCacheManager</emphasis>. In the next sections, we
+ will show how to configure the component and how to launch external JVM
+ instances.</para>
+
+ <section>
+ <title>Configuration of the DistributedCacheManager</title>
+
+ <para>The <emphasis>DistributedCacheManager</emphasis> is the
+ component that will manage all the cache instances that we expect to
+ be distributed, it must be unique in the whole JVM which means that it
+ must be declared at <emphasis>RootContainer</emphasis> level in
portal
+ mode or at <emphasis>StandaloneContainer</emphasis> in standalone
+ mode. See below an example of configuration.</para>
+
+ <programlisting language="xml"><component>
+
<type>org.exoplatform.services.ispn.DistributedCacheManager</type>
+ <init-params>
+ <value-param>
+ <name>infinispan-configuration</name>
+
<value>jar:/conf/portal/distributed-cache-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>parameters</name>
+ <description>The parameters of the
configuration</description>
+ <property name="infinispan-num-owners"
value="1"></property>
+ </properties-param>
+ </init-params>
+</component></programlisting>
+
+ <table>
+ <title>Fields description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>infinispan-configuration</entry>
+
+ <entry>Location of the infinispan configuration to use in
+ which all the distributed caches must be configured by name.
+ All paths supported by the ConfigurationManager with prefixes
+ like jar:/..., classpath:/..., etc. This parameter is
+ mandatory.</entry>
+ </row>
+
+ <row>
+ <entry>parameters</entry>
+
+ <entry>In the configuration file, you can add a set of
+ variables of type ${variable-name}, these variables will be
+ solved using the values of the parameters. The name of the
+ variable in the configuration file must match with the name of
+ the parameter. This parameter is optional.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>As described above, the configuration of infinispan must defined
+ explicitly each cache using the <emphasis>nameCache</emphasis> block
+ no dynamic configuration of cache is supported. Indeed to ensure that
+ the whole cluster is consistent in term of defined cache, it is
+ required to configure all the cache that you will need and register it
+ using its future name.</para>
+
+ <para>For now, we have 2 supported cache name which are
+ <emphasis>JCRCache</emphasis> and
<emphasis>eXoCache</emphasis>.
+ <emphasis>JCRCache</emphasis> is the name of the cache that we use
in
+ case we would like to store the data of the JCR into a distributed
+ cache. <emphasis>eXoCache</emphasis> is the name of the cache that
we
+ use in case we would like to store the data of some eXo Cache
+ instances into a distributed cache.</para>
+
+ <para>See below an example of infinispan configuration with only
+ <emphasis>eXoCache</emphasis> defined:</para>
+
+ <programlisting><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 jmxDomain="exo" enabled="true"
allowDuplicateDomains="true"/>
+ <transport
transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"
clusterName="Infinispan-cluster"
distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile"
value="udp.xml"/>
+ </properties>
+ </transport>
+ <shutdown hookBehavior="DEFAULT"/>
+ </global>
+ <namedCache name="eXoCache">
+ <locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="true" />
+ <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"
eagerLockSingleNode="true" transactionMode="TRANSACTIONAL"/>
+ <jmxStatistics enabled="true"/>
+ <clustering mode="distribution">
+ <hash numOwners="${infinispan-num-owners}"
rehashRpcTimeout="120000" />
+ <sync/>
+ </clustering>
+ <invocationBatching enabled="true"/>
+ </namedCache>
+</infinispan></programlisting>
+ </section>
+
+ <section>
+ <title>Launch a CacheServer</title>
+
+ <para>In case you intend to use the distribued mode, you can launch
+ external JVM in standalone mode to provide more memory to your current
+ cache. To do so, you will need to get the file of type
+
<emphasis>exo.jcr.component.core.impl.infinispan.v5-X.Y.Z-binary.zip</emphasis>
+ in which you will find scripts to launch your cache servers. These
+ scripts allow optional arguments that are described below:</para>
+
+
<para><emphasis>help|?|<configuration-file-path>|udp|tcp
+ <initial-hosts></emphasis></para>
+
+ <table>
+ <title>Arguments description</title>
+
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>help</entry>
+
+ <entry>Print the expected syntax.</entry>
+ </row>
+
+ <row>
+ <entry>?</entry>
+
+ <entry>Print the expected syntax.</entry>
+ </row>
+
+ <row>
+ <entry>configuration-file-path</entry>
+
+ <entry>The location of the configuration file to use, we
+ expect an absolute path. It will try to get it using the
+ current class loader, if it cannot be found it will get it
+ from the file system. By default it will use the path
+ <emphasis>/conf/cache-server-configuration.xml</emphasis>
that
+ is actually a file bundled into the jar.</entry>
+ </row>
+
+ <row>
+ <entry>udp</entry>
+
+ <entry>We use this parameter value when we want to use the
+ default configuration file with udp as transport stack which
+ is actually the default stack used which means that it will
+ have the exact same behavior as when we don't provide any
+ parameter.</entry>
+ </row>
+
+ <row>
+ <entry>tcp</entry>
+
+ <entry>We use this parameter value when we want to use the
+ default configuration file with tcp as transport
+ stack.</entry>
+ </row>
+
+ <row>
+ <entry>initial-hosts</entry>
+
+ <entry>This parameter is optional and is only allowed in case
+ the tcp stack is enabled, it will allow you to define the set
+ of hosts that will be part of the cluster. The syntax of this
+ parameter is a list of hostname[port] comma-separated. Knowing
+ that the default value is "localhost[7800],localhost[7801]" if
+ this parameter is not set, the bind address will be
+ automatically set to 127.0.0.1 so you need to ensure that your
+ server is configured to have it mapped to localhost.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Configure the cache of your workspace</title>
+
+ <para>In case you would like to configure your workspace in order to
+ rely on a distributed cache apart using
+
<emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache</emphasis>
+ as FQN of your cache you will need to set the property
+ <emphasis>use-distributed-cache</emphasis> to
+ <emphasis>true</emphasis>. If you do so the JCR cache will rely on
the
+ cache called <emphasis>JCRCache</emphasis> defined in the infinispan
+ configuration provided to the
+ <emphasis>DistributedCacheManager</emphasis>.</para>
+ </section>
+ </section>
</section>
</chapter>
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2012-01-31 15:51:04 UTC (rev 5545)
+++ jcr/trunk/pom.xml 2012-01-31 15:59:04 UTC (rev 5546)
@@ -397,12 +397,12 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>5.1.0.CR3</version>
+ <version>5.1.0.FINAL</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-jdbc</artifactId>
- <version>5.1.0.CR3</version>
+ <version>5.1.0.FINAL</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>