[exo-jcr-commits] exo-jcr SVN: r5332 - in jcr/trunk: exo.jcr.component.core and 60 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Dec 15 11:53:41 EST 2011
Author: nfilotto
Date: 2011-12-15 11:53:39 -0500 (Thu, 15 Dec 2011)
New Revision: 5332
Added:
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/lock/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexCacheStore.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CompressedISPNChangesBuffer.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/
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/ISPNCacheHelper.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/GenericTransactionService.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossTransactionsService.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/
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/main/resources/conf/portal/exo-jcr-ispn-config.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCacheInClusterMode.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TesterISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/lab/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/lab/infinispan/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/lab/infinispan/TestISPNCache.java
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-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/cluster/test-jcr-config.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/udp-mux.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-config.xml
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-jcr-config-sjdbc.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config.xml
jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/test.policy
Removed:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/infinispan/
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-data.xml
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-indexer.xml
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-lock.xml
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-ispn-config.xml
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/config/
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/infinispan/
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-config.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-lock.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Modified:
jcr/trunk/exo.jcr.component.core/pom.xml
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestArabicSearch.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestDateSearch.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestExcelFileSearch.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/blob/TestBinaryValueMultiThreading.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/dataflow/persistent/TestGetNodesConcurrentModification.java
jcr/trunk/pom.xml
Log:
EXOJCR-1682: Improve ISPN integration to support properly the distribution mode (jcr part 1)
* Upgrade to ISPN 5.1.0.CR1
* Move ISPN related to class to a dedicated project because it is now incompatible with the rest due to JGroups 3.0
Modified: jcr/trunk/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/pom.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -37,11 +37,9 @@
<statistics.enabled>false</statistics.enabled>
<properties.url.suffix>.properties</properties.url.suffix>
<properties.url.prefix>classpath:/conf/standalone/default</properties.url.prefix>
- <test.cache.jbc>**/persistent/cache/jbosscache/**</test.cache.jbc>
- <test.cache.ispn>**/persistent/cache/infinispan/**</test.cache.ispn>
<test.cache.all>**/persistent/cache/**</test.cache.all>
<!-- ispn specific exclude by default -->
- <test.cache.exclude>${test.cache.ispn}</test.cache.exclude>
+ <test.cache.exclude>**/persistent/cache/foo/**</test.cache.exclude>
</properties>
<dependencies>
<dependency>
@@ -210,16 +208,6 @@
<artifactId>jbosscache-core</artifactId>
</dependency>
<dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-cachestore-jdbc</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-tests</artifactId>
<classifier>sources</classifier>
@@ -328,7 +316,7 @@
<property>
<name>jgroups.stack</name>
<value>udp</value>
- </property>
+ </property>
</systemProperties>
<includes>
<include>org/exoplatform/services/jcr/api/**/Test*.java</include>
@@ -388,8 +376,20 @@
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>test-jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -501,14 +501,6 @@
<profile>
<id>run-tck</id>
<build>
- <testResources>
- <testResource>
- <directory>src/TCK/java</directory>
- <includes>
- <include>**/org/apache/jackrabbit/test/api/nodetype/spec/*.txt</include>
- </includes>
- </testResource>
- </testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -567,7 +559,7 @@
<property>
<name>jgroups.stack</name>
<value>udp</value>
- </property>
+ </property>
</systemProperties>
<includes>
<include>org/apache/jackrabbit/test/api/*Test.java</include>
@@ -595,14 +587,6 @@
<profile>
<id>run-all</id>
<build>
- <testResources>
- <testResource>
- <directory>src/TCK/java</directory>
- <includes>
- <include>**/org/apache/jackrabbit/test/api/nodetype/spec/*.txt</include>
- </includes>
- </testResource>
- </testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -661,7 +645,7 @@
<property>
<name>jgroups.stack</name>
<value>udp</value>
- </property>
+ </property>
</systemProperties>
<includes>
<!-- From default tests -->
@@ -914,84 +898,5 @@
<jcr.test.configuration.file>/conf/standalone/cluster/test-configuration-jbc.xml</jcr.test.configuration.file>
</properties>
</profile>
- <profile>
- <id>ispn</id>
- <properties>
- <jcr.test.configuration.file>/conf/standalone/test-configuration.xml</jcr.test.configuration.file>
- <test.cache.exclude>${test.cache.jbc}</test.cache.exclude>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.jgroups</groupId>
- <artifactId>jgroups</artifactId>
- <version>2.12.1.3.Final</version>
- </dependency>
- <!-- Excludes jboss-logging-spi since it is in conflict with the
- latest version that is required by infinispan -->
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>ispn-sjdbc</id>
- <properties>
- <jcr.test.configuration.file>/conf/standalone/test-configuration-sjdbc.xml</jcr.test.configuration.file>
- <test.cache.exclude>${test.cache.jbc}</test.cache.exclude>
- <properties.url.suffix>-sjdbc.properties</properties.url.suffix>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.jgroups</groupId>
- <artifactId>jgroups</artifactId>
- <version>2.12.1.3.Final</version>
- </dependency>
- <!-- Excludes jboss-logging-spi since it is in conflict with the
- latest version that is required by infinispan -->
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>ispn-cluster</id>
- <properties>
- <jcr.test.configuration.file>/conf/standalone/cluster/test-configuration.xml</jcr.test.configuration.file>
- <test.cache.exclude>${test.cache.jbc}</test.cache.exclude>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.jgroups</groupId>
- <artifactId>jgroups</artifactId>
- <version>2.12.1.3.Final</version>
- </dependency>
- <!-- Excludes jboss-logging-spi since it is in conflict with the
- latest version that is required by infinispan -->
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </profile>
</profiles>
</project>
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -19,17 +19,12 @@
package org.exoplatform.services.jcr.config;
import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.commons.utils.PrivilegedFileHelper;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
-import java.util.regex.Pattern;
/**
* Builds configuration from template using map of template-variables <--> value.
@@ -40,16 +35,9 @@
* @version $Id: TemplateConfigurationHelper.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
*
*/
-public class TemplateConfigurationHelper
+public class TemplateConfigurationHelper extends org.exoplatform.container.util.TemplateConfigurationHelper
{
- // list with include-patterns
- private List<Pattern> includes = new ArrayList<Pattern>();
- // list with exclude-patterns
- private List<Pattern> excludes = new ArrayList<Pattern>();
-
- private ConfigurationManager cfm;
-
/**
* Creates instance of template configuration helper with given lists of filtering
* patterns. Parameter will be included only if it matches any include-pattern and
@@ -65,18 +53,7 @@
*/
public TemplateConfigurationHelper(String[] includes, String[] excludes, ConfigurationManager cfm)
{
- super();
- this.cfm = cfm;
- // compile include patterns
- for (String regex : includes)
- {
- this.includes.add(Pattern.compile(regex));
- }
- // compile exclude patterns
- for (String regex : excludes)
- {
- this.excludes.add(Pattern.compile(regex));
- }
+ super(includes, excludes, cfm);
}
/**
@@ -88,89 +65,6 @@
* @return
* @throws IOException
*/
- public InputStream fillTemplate(InputStream inputStream, Map<String, String> parameters) throws IOException
- {
- if (inputStream == null || parameters == null || parameters.size() == 0)
- {
- return inputStream;
- }
- // parameters filtering
- Map<String, String> preparedParams = prepareParameters(parameters);
- // read stream
- String configuration = readStream(inputStream);
- for (Entry<String, String> entry : preparedParams.entrySet())
- {
- configuration = configuration.replace(entry.getKey(), entry.getValue());
- }
- // create new stream
- InputStream configurationStream = new ByteArrayInputStream(configuration.getBytes());
- return configurationStream;
- }
-
- /**
- * Reads configuration file from a stream and replaces all the occurrences of template-variables
- * (like : "${parameter.name}") with values provided in the map.
- *
- * @param filename
- * @param parameters
- * @return
- * @throws IOException
- */
- public InputStream fillTemplate(String filename, Map<String, String> parameters) throws IOException
- {
- InputStream inputStream = null;
- // try to get using configuration manager
- try
- {
- inputStream = cfm.getInputStream(filename);
- }
- catch (Exception e)
- {
- // will try to use another resolve mechanism
- }
-
- // try to get resource by class loader
- if (inputStream == null)
- {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- inputStream = cl == null ? null : cl.getResourceAsStream(filename);
- }
-
- // check system class loader
- if (inputStream == null)
- {
- inputStream = getClass().getClassLoader().getResourceAsStream(filename);
- }
-
- // try to get as file stream
- if (inputStream == null)
- {
- try
- {
- inputStream = PrivilegedFileHelper.fileInputStream(filename);
- }
- catch (IOException e)
- {
- // Still can't resolve
- }
- }
- // inputStream still remains null, so file was not opened
- if (inputStream == null)
- {
- throw new IOException("Can't find or open file:" + filename);
- }
- return fillTemplate(inputStream, parameters);
- }
-
- /**
- * Reads configuration file from a stream and replaces all the occurrences of template-variables
- * (like : "${parameter.name}") with values provided in the map.
- *
- * @param inputStream
- * @param parameters
- * @return
- * @throws IOException
- */
public InputStream fillTemplate(InputStream inputStream, List<SimpleParameterEntry> parameters) throws IOException
{
Map<String, String> map = new HashMap<String, String>();
@@ -199,73 +93,4 @@
}
return fillTemplate(filename, map);
}
-
- /**
- * Checks if String mathes to any pattern from the list
- *
- * @param patterns
- * @param parameter
- * @return
- */
- private boolean matches(List<Pattern> patterns, String parameter)
- {
- for (Pattern pattern : patterns)
- {
- if (pattern.matcher(parameter).matches())
- {
- // string matched
- return true;
- }
- }
- return false;
- }
-
- /**
- * Filters the map of parameters, leaving only those than matches filtering regular expressions.
- * Also adds "${}" to the parameter key: <br>
- * I.e. such map provided on input:
- *
- * "jbosscache-cache.loader":"org.exoplatform"
- * "jbosscache-configuration":"/conf/test.xml"
- * "max-volatile-size":"100Kb"
- *
- * the output will be like:
- *
- * "${jbosscache-cache.loader}":"org.exoplatform"
- *
- * Other will be ignored (depending on includes/excludes lists provided in constructor).
- *
- * @param parameters
- * @return
- */
- protected Map<String, String> prepareParameters(Map<String, String> parameters)
- {
- Map<String, String> map = new HashMap<String, String>();
- for (Entry<String, String> entry : parameters.entrySet())
- {
- if (matches(includes, entry.getKey()) && !matches(excludes, entry.getKey()))
- {
- map.put("${" + entry.getKey() + "}", entry.getValue());
- }
- }
- return map;
- }
-
- /**
- * Reads bytes from input stream and builds a string from them
- *
- * @param inputStream
- * @return
- * @throws IOException
- */
- protected String readStream(InputStream inputStream) throws IOException
- {
- StringBuffer out = new StringBuffer();
- byte[] b = new byte[4096];
- for (int n; (n = inputStream.read(b)) != -1;)
- {
- out.append(new String(b, 0, n));
- }
- return out.toString();
- }
}
Deleted: jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-data.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-data.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-data.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
-
- <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
- <properties>
- <property name="configurationFile" value="${jgroups-configuration}"/>
- </properties>
- </transport>
- </global>
-
- <default>
- <clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <sync replTimeout="20000"/>
- </clustering>
-
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="LRU" threadPolicy="DEFAULT" maxEntries="1000000"/>
- <expiration wakeUpInterval="5000"/>
- </default>
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-indexer.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
-
- <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
- <properties>
- <property name="configurationFile" value="${jgroups-configuration}"/>
- </properties>
- </transport>
- </global>
-
- <default>
- <clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <sync replTimeout="20000"/>
- </clustering>
-
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="NONE"/>
-
- <loaders passivation="false" shared="false" preload="false">
- <loader class="${infinispan-cachestore-classname}" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
- <async enabled="false"/>
- </loader>
- </loaders>
- </default>
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-lock.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
-
- <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
- <properties>
- <property name="configurationFile" value="${jgroups-configuration}"/>
- </properties>
- </transport>
- </global>
-
- <default>
- <clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <sync replTimeout="20000"/>
- </clustering>
-
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="NONE"/>
-
- <loaders passivation="false" shared="true" preload="true">
- <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" 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}"/>
- <property name="dataColumnName" value="${infinispan-cl-cache.jdbc.data.column}"/>
- <property name="timestampColumnName" value="${infinispan-cl-cache.jdbc.timestamp.column}"/>
- <property name="idColumnType" value="${infinispan-cl-cache.jdbc.id.type}"/>
- <property name="dataColumnType" value="${infinispan-cl-cache.jdbc.data.type}"/>
- <property name="timestampColumnType" value="${infinispan-cl-cache.jdbc.timestamp.type}"/>
- <property name="dropTableOnExit" value="${infinispan-cl-cache.jdbc.table.drop}"/>
- <property name="createTableOnStart" value="${infinispan-cl-cache.jdbc.table.create}"/>
- <property name="connectionFactoryClass" value="${infinispan-cl-cache.jdbc.connectionFactory}"/>
- <property name="datasourceJndiLocation" value="${infinispan-cl-cache.jdbc.datasource}"/>
- </properties>
- <async enabled="false"/>
- </loader>
- </loaders>
- </default>
-
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-ispn-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-ispn-config.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-ispn-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,214 +0,0 @@
-<!--
-
- 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.
-
--->
-<repository-service default-repository="repository">
- <repositories>
- <repository name="repository" system-workspace="production" default-workspace="production">
- <security-domain>exo-domain</security-domain>
- <access-control>optional</access-control>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="production">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/production" />
- </properties>
- <value-storages>
- <value-storage id="production" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/production" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="true"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-data.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/production" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-lock.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="backup">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/backup" />
- </properties>
- <value-storages>
- <value-storage id="backup" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/backup" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="true"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-data.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/backup" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-lock.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="digital-assets">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/digital-assets" />
- </properties>
- <value-storages>
- <value-storage id="digital-assets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/digital-assets" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:folder" />
- </properties>
- </initializer>
- <cache enabled="true"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-data.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/digital-assets" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-lock.xml" />
- <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service>
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestArabicSearch.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestArabicSearch.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestArabicSearch.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -27,8 +27,8 @@
import org.exoplatform.services.jcr.impl.core.query.lucene.FieldNames;
import org.exoplatform.services.jcr.impl.core.query.lucene.Util;
-import java.io.File;
import java.io.FileInputStream;
+import java.net.URL;
import java.util.Calendar;
import javax.jcr.query.Query;
@@ -49,10 +49,10 @@
public void testSearchWithEncodingParameter() throws Exception
{
- File file = new File("src/test/resources/ArabicUTF8.txt");
- assertTrue("/test/resources/ArabicUTF8.txt not found", file.exists());
+ URL url = TestArabicSearch.class.getResource("/ArabicUTF8.txt");
+ assertNotNull("ArabicUTF8.txt not found", url);
- FileInputStream fis = new FileInputStream(file);
+ FileInputStream fis = new FileInputStream(url.getFile());
NodeImpl node = (NodeImpl)root.addNode(fileName, "nt:file");
NodeImpl cont = (NodeImpl)node.addNode("jcr:content", "nt:resource");
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestDateSearch.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestDateSearch.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestDateSearch.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -27,8 +27,8 @@
import org.exoplatform.services.jcr.impl.core.query.lucene.FieldNames;
import org.exoplatform.services.jcr.impl.core.query.lucene.Util;
-import java.io.File;
import java.io.FileInputStream;
+import java.net.URL;
import java.util.Calendar;
import javax.jcr.query.Query;
@@ -48,10 +48,10 @@
public void testSearchDate() throws Exception
{
- File file = new File("src/test/resources/test.xls");
- assertTrue("/test/resources/test.xls not found", file.exists());
+ URL url = TestDateSearch.class.getResource("/test.xls");
+ assertNotNull("test.xls not found", url);
- FileInputStream fis = new FileInputStream(file);
+ FileInputStream fis = new FileInputStream(url.getFile());
NodeImpl node = (NodeImpl)root.addNode(fileName, "nt:file");
NodeImpl cont = (NodeImpl)node.addNode("jcr:content", "nt:resource");
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestExcelFileSearch.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestExcelFileSearch.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/query/TestExcelFileSearch.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -31,8 +31,8 @@
import org.exoplatform.services.jcr.impl.core.query.lucene.FieldNames;
import org.exoplatform.services.jcr.impl.core.query.lucene.Util;
-import java.io.File;
import java.io.FileInputStream;
+import java.net.URL;
import java.util.Calendar;
/**
@@ -46,10 +46,10 @@
public void testFindFileContent() throws Exception
{
- File file = new File("src/test/resources/test.xls");
- assertTrue("/test/resources/book.xls not found", file.exists());
+ URL url = TestExcelFileSearch.class.getResource("/test.xls");
+ assertNotNull("test.xls not found", url);
- FileInputStream fis = new FileInputStream(file);
+ FileInputStream fis = new FileInputStream(url.getFile());
NodeImpl node = (NodeImpl)root.addNode("excelFile", "nt:file");
NodeImpl cont = (NodeImpl)node.addNode("jcr:content", "nt:resource");
@@ -61,7 +61,7 @@
root.save();
fis.close();
- fis = new FileInputStream(file);
+ fis = new FileInputStream(url.getFile());
DocumentReaderService extr =
(DocumentReaderService)session.getContainer().getComponentInstanceOfType(DocumentReaderService.class);
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -336,7 +336,6 @@
/**
* @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getACLHolders()
*/
- @Override
public List<ACLHolder> getACLHolders() throws RepositoryException, IllegalStateException,
UnsupportedOperationException
{
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/blob/TestBinaryValueMultiThreading.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/blob/TestBinaryValueMultiThreading.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/blob/TestBinaryValueMultiThreading.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -23,6 +23,7 @@
import org.exoplatform.services.jcr.impl.core.SessionImpl;
import java.io.FileInputStream;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Calendar;
@@ -43,7 +44,13 @@
private String LOCAL_BIG_FILE = null;
- private String LOCAL_SMALL_FILE = "src/test/resources/index/test_index.doc";
+ private static String LOCAL_SMALL_FILE;
+ static
+ {
+ URL url = TestBinaryValueMultiThreading.class.getResource("/index/test_index.doc");
+ assertNotNull("test_index.doc not found", url);
+ LOCAL_SMALL_FILE = url.getFile();
+ }
private static String REMOTE_BIG_FILE = "\\\\Exooffice\\public\\Tmp\\resources\\BigFile.zip";
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/dataflow/persistent/TestGetNodesConcurrentModification.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/dataflow/persistent/TestGetNodesConcurrentModification.java 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/dataflow/persistent/TestGetNodesConcurrentModification.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -23,7 +23,6 @@
import org.exoplatform.services.jcr.impl.core.NodeImpl;
import org.exoplatform.services.jcr.impl.core.SessionImpl;
-import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -164,7 +163,9 @@
super.setUp();
fails = new ArrayList<String>();
- contentFile = new URL("file:///" + new File("src/test/resources/index/test_index.doc").getAbsolutePath());
+ URL url = TestGetNodesConcurrentModification.class.getResource("/index/test_index.doc");
+ assertNotNull("test_index.doc not found", url);
+ contentFile = url;
initDB();
}
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,683 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
- xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
- <component>
- <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
- <value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="INFO, stdout, file"/>
-
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
- <property name="log4j.appender.stdout.threshold" value="DEBUG"/>
-
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.stdout.layout.ConversionPattern"
- value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
-
- <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
- <property name="log4j.appender.file.File" value="target/jcr.log"/>
-
- <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.file.layout.ConversionPattern"
- value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
-
- <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
- <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
- </properties-param>
-
- <!-- value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedSimpleLog</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.SimpleLogConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>SimpleLog properties</description>
- <property name="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
- <property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
- </properties-param -->
-
- <!-- value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedJdk14Logger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>jdk1.4 Logger properties</description>
- <property name="handlers" value="java.util.logging.ConsoleHandler"/>
- <property name=".level" value="FINE"/>
- <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
- </properties-param -->
-
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.RepositoryService</key>
- <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>add.namespaces</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
- <init-params>
- <properties-param>
- <name>namespaces</name>
- <property name="test" value="http://www.apache.org/jackrabbit/test"/>
- <property name="exojcrtest" value="http://www.exoplatform.org/jcr/test/1.0"/>
- <property name="rma" value="http://www.rma.com/jcr/"/>
- <property name="metadata" value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
- <property name="dc" value="http://purl.org/dc/elements/1.1/"/>
- <property name="publication" value="http://www.exoplatform.com/jcr/publication/1.1/"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>add.nodeType</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
- <init-params>
- <values-param>
- <name>autoCreatedInNewRepository</name>
- <description>Node types configuration file</description>
- <value>jar:/conf/test/nodetypes-tck.xml</value>
- <value>jar:/conf/test/nodetypes-impl.xml</value>
- <value>jar:/conf/test/nodetypes-usecase.xml</value>
- <value>jar:/conf/test/nodetypes-config.xml</value>
- <value>jar:/conf/test/nodetypes-config-extended.xml</value>
- <value>jar:/conf/test/wcm-nodetypes.xml</value>
- <value>jar:/conf/test/nodetypes-publication-config.xml</value>
- <value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
- </values-param>
-
- <values-param>
- <name>testInitNodeTypesRepository</name>
- <description>
- Node types configuration file for repository with name testInitNodeTypesRepository
- </description>
- <value>jar:/conf/test/nodetypes-test.xml</value>
- </values-param>
-
- <values-param>
- <name>testInitNodeTypesRepositoryTest2</name>
- <description>
- Node types configuration file for repository with name testInitNodeTypesRepositoryTest2
- </description>
- <value>jar:/conf/test/nodetypes-test2.xml</value>
- </values-param>
-
- <!--values-param>
- <name>testInitNodeTypesRepositoryTest3</name>
- <description>Node types from ext. Needed bacause core starup earlie than ext</description>
- <value>jar:/conf/test/nodetypes-test3_ext.xml</value>
- </values-param-->
-
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>jar:/conf/standalone/cluster/test-jcr-config.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="dialect" value="auto" />
- <property name="source-name" value="jdbcjcr"/>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.security.Authenticator</key>
- <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
- </component>
-
- <component>
- <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>3000</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.rpc.RPCService</key>
- <type>org.exoplatform.services.rpc.impl.RPCServiceImpl</type>
- <init-params>
- <value-param>
- <name>jgroups-configuration</name>
- <value>jar:/conf/standalone/cluster/udp-mux.xml</value>
- </value-param>
- <value-param>
- <name>jgroups-cluster-name</name>
- <value>RPCService-Cluster</value>
- </value-param>
- <value-param>
- <name>jgroups-default-timeout</name>
- <value>0</value>
- </value-param>
- </init-params>
- </component>
- <!-- component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>300</value>
- </value-param>
- </init-params>
- </component -->
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <!-- MVCC configured to prevent possible deadlocks when a global Tx is active -->
- <property name="url" value="${jdbcjcr.url:jdbc:hsqldb:file:target/temp/data/portal;hsqldb.tx=mvcc}"/>
- <property name="username" value="${jdbcjcr.username:sa}"/>
- <property name="password" value="${jdbcjcr.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr1.url:jdbc:hsqldb:file:target/temp/data/jcr}"/>
- <property name="username" value="${jdbcjcr1.username:sa}"/>
- <property name="password" value="${jdbcjcr1.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr2.url:jdbc:hsqldb:file:target/temp/data/jcr2}"/>
- <property name="username" value="${jdbcjcr2.username:sa}"/>
- <property name="password" value="${jdbcjcr2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr3.url:jdbc:hsqldb:file:target/temp/data/jcr3}"/>
- <property name="username" value="${jdbcjcr3.username:sa}"/>
- <property name="password" value="${jdbcjcr3.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrtest</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- <property name="maxActive" value="100" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrdb2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcrdb2.url:jdbc:hsqldb:file:target/temp/data/portaldb2}"/>
- <property name="username" value="${jdbcjcrdb2.username:sa}"/>
- <property name="password" value="${jdbcjcrdb2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1db2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr1db2.url:jdbc:hsqldb:file:target/temp/data/jcrdb2}"/>
- <property name="username" value="${jdbcjcr1db2.username:sa}"/>
- <property name="password" value="${jdbcjcr1db2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrtck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcrtck.url:jdbc:hsqldb:file:target/temp/data/portaltck}"/>
- <property name="username" value="${jdbcjcrtck.username:sa}"/>
- <property name="password" value="${jdbcjcrtck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1tck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr1tck.url:jdbc:hsqldb:file:target/temp/data/jcrtck}"/>
- <property name="username" value="${jdbcjcr1tck.username:sa}"/>
- <property name="password" value="${jdbcjcr1tck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2tck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr2tck.url:jdbc:hsqldb:file:target/temp/data/jcr2tck}"/>
- <property name="username" value="${jdbcjcr2tck.username:sa}"/>
- <property name="password" value="${jdbcjcr2tck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export1"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export2"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export3"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>testdbcleaner</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${testdbcleaner.url:jdbc:hsqldb:file:target/temp/data/testdbcleaner}"/>
- <property name="username" value="${testdbcleaner.username:sa}"/>
- <property name="password" value="${testdbcleaner.password:}"/>
- <property name="maxActive" value="20" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.jcr</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>repo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.jcr.Repository</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="repositoryName" value="db1"/>
- <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>rmi.jcr</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>rmirepository</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.jcr.Repository</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.exoplatform.services.jcr.rmi.RepositoryFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="url" value="//localhost:9999/repository"/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
- <!--<import>jar:/conf/database-configuration.hsql.xml</import> -->
-</configuration>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
-
- <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
- <properties>
- <property name="configurationFile" value="${jgroups-configuration}"/>
- </properties>
- </transport>
- </global>
-
- <default>
- <clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <sync replTimeout="20000"/>
- </clustering>
-
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="LRU" threadPolicy="DEFAULT" maxEntries="1000000"/>
- <expiration wakeUpInterval="5000"/>
- </default>
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
-
- <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
- <properties>
- <property name="configurationFile" value="${jgroups-configuration}"/>
- </properties>
- </transport>
- </global>
-
- <default>
- <clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <sync replTimeout="20000"/>
- </clustering>
-
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="NONE"/>
-
- <loaders passivation="false" shared="false" preload="false">
- <loader class="${infinispan-cachestore-classname}" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
- <async enabled="false"/>
- </loader>
- </loaders>
- </default>
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
-
- <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
- <properties>
- <property name="configurationFile" value="${jgroups-configuration}"/>
- </properties>
- </transport>
- </global>
-
- <default>
- <clustering mode="replication">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <sync replTimeout="20000"/>
- </clustering>
-
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="NONE"/>
-
- <loaders passivation="false" shared="true" preload="true">
- <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" 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}"/>
- <property name="dataColumnName" value="${infinispan-cl-cache.jdbc.data.column}"/>
- <property name="timestampColumnName" value="${infinispan-cl-cache.jdbc.timestamp.column}"/>
- <property name="idColumnType" value="${infinispan-cl-cache.jdbc.id.type}"/>
- <property name="dataColumnType" value="${infinispan-cl-cache.jdbc.data.type}"/>
- <property name="timestampColumnType" value="${infinispan-cl-cache.jdbc.timestamp.type}"/>
- <property name="dropTableOnExit" value="${infinispan-cl-cache.jdbc.table.drop}"/>
- <property name="createTableOnStart" value="${infinispan-cl-cache.jdbc.table.create}"/>
- <property name="connectionFactoryClass" value="${infinispan-cl-cache.jdbc.connectionFactory}"/>
- <property name="datasourceJndiLocation" value="${infinispan-cl-cache.jdbc.datasource}"/>
- </properties>
- <async enabled="false"/>
- </loader>
- </loaders>
- </default>
-
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,695 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
- <!--
-
- 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.
- -->
-<repository-service default-repository="db1">
- <repositories>
- <repository name="db1" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws" />
- </properties>
- <value-storages>
- <value-storage id="ws"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type"
- value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="jdbc-dialect" value="auto" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1" />
- </properties>
- <value-storages>
- <value-storage id="ws1"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db1/ws1" />
- <property name="synonymprovider-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws2" lazy-read-threshold="1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2" />
- </properties>
- <value-storages>
- <value-storage id="ws2"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db1/ws2" />
- <property name="synonymprovider-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws3">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr3" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws3" />
- </properties>
- <value-storages>
- <!--
- This storage is used to check whether properties are removed correctly from each value-storage
- (TestRemoveFromValueStorage.java)
- -->
- <value-storage id="ws3_big"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3_big" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="1024K" />
- </filters>
- </value-storage>
- <value-storage id="ws3"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type"
- value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db1/ws3" />
- <property name="synonymprovider-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr3" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
-
- <repository name="db2" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrdb2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/wsdb2" />
- </properties>
- <value-storages>
- <value-storage id="ws"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/wsdb2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions"
- value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db2/ws" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1db2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1db2" />
- </properties>
- <value-storages>
- <value-storage id="ws1"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1db2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;any add_node;any set_property;any remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db2/ws1" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1db2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
-
- <repository name="db1tck" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrtck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/wstck" />
- </properties>
- <value-storages>
- <value-storage id="ws"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/wstck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions"
- value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db1tck/ws" />
- <property name="synonymprovider-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
- <property name="spellchecker-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1tck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1tck" />
- </properties>
- <value-storages>
- <value-storage id="ws1"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1tck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions"
- value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db1tck/ws1" />
- <property name="synonymprovider-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1tck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws2">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr2tck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2tck" />
- </properties>
- <value-storages>
- <value-storage id="ws2"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2tck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions"
- value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="max-volatile-time" value="60" />
- <property name="index-dir" value="target/temp/index/db1tck/ws2" />
- <property name="synonymprovider-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class"
- value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
- <property name="extractorPoolSize" value="2" />
- <property name="extractorTimeout" value="10" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="infinispan-cluster-name" value="JCR-cluster" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2tck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service>
\ No newline at end of file
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,504 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
- xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
- <component>
- <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
- <value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="INFO, stdout, file"/>
-
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
- <property name="log4j.appender.stdout.threshold" value="DEBUG"/>
-
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.stdout.layout.ConversionPattern"
- value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
-
- <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
- <property name="log4j.appender.file.File" value="target/jcr.log"/>
-
- <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.file.layout.ConversionPattern"
- value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
-
- <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
- <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
- </properties-param>
-
- <!-- value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedSimpleLog</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.SimpleLogConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>SimpleLog properties</description>
- <property name="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
- <property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
- </properties-param -->
-
- <!-- value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedJdk14Logger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>jdk1.4 Logger properties</description>
- <property name="handlers" value="java.util.logging.ConsoleHandler"/>
- <property name=".level" value="FINE"/>
- <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
- </properties-param -->
-
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.RepositoryService</key>
- <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>add.namespaces</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
- <init-params>
- <properties-param>
- <name>namespaces</name>
- <property name="test" value="http://www.apache.org/jackrabbit/test"/>
- <property name="exojcrtest" value="http://www.exoplatform.org/jcr/test/1.0"/>
- <property name="rma" value="http://www.rma.com/jcr/"/>
- <property name="metadata" value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
- <property name="dc" value="http://purl.org/dc/elements/1.1/"/>
- <property name="publication" value="http://www.exoplatform.com/jcr/publication/1.1/"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>add.nodeType</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
- <init-params>
- <values-param>
- <name>autoCreatedInNewRepository</name>
- <description>Node types configuration file</description>
- <value>jar:/conf/test/nodetypes-tck.xml</value>
- <value>jar:/conf/test/nodetypes-impl.xml</value>
- <value>jar:/conf/test/nodetypes-usecase.xml</value>
- <value>jar:/conf/test/nodetypes-config.xml</value>
- <value>jar:/conf/test/nodetypes-config-extended.xml</value>
- <value>jar:/conf/test/wcm-nodetypes.xml</value>
- <value>jar:/conf/test/nodetypes-publication-config.xml</value>
- <value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
- </values-param>
-
- <values-param>
- <name>testInitNodeTypesRepository</name>
- <description>
- Node types configuration file for repository with name testInitNodeTypesRepository
- </description>
- <value>jar:/conf/test/nodetypes-test.xml</value>
- </values-param>
-
- <values-param>
- <name>testInitNodeTypesRepositoryTest2</name>
- <description>
- Node types configuration file for repository with name testInitNodeTypesRepositoryTest2
- </description>
- <value>jar:/conf/test/nodetypes-test2.xml</value>
- </values-param>
-
- <!--values-param>
- <name>testInitNodeTypesRepositoryTest3</name>
- <description>Node types from ext. Needed bacause core starup earlie than ext</description>
- <value>jar:/conf/test/nodetypes-test3_ext.xml</value>
- </values-param-->
-
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>jar:/conf/standalone/test-jcr-config-sjdbc.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="dialect" value="auto" />
- <property name="source-name" value="jdbcjcr"/>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.security.Authenticator</key>
- <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
- </component>
-
- <component>
- <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>3000</value>
- </value-param>
- </init-params>
- </component>
-
- <!-- component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>300</value>
- </value-param>
- </init-params>
- </component -->
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <!-- MVCC configured to prevent possible deadlocks when a global Tx is active -->
- <property name="url" value="${jdbcjcr.url:jdbc:hsqldb:file:target/temp/data/portal;hsqldb.tx=mvcc}"/>
- <property name="username" value="${jdbcjcr.username:sa}"/>
- <property name="password" value="${jdbcjcr.password:}"/>
- <property name="maxActive" value="20" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrtest</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- <property name="maxActive" value="100" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrdb2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcrdb2.url:jdbc:hsqldb:file:target/temp/data/portaldb2}"/>
- <property name="username" value="${jdbcjcrdb2.username:sa}"/>
- <property name="password" value="${jdbcjcrdb2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrtck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcrtck.url:jdbc:hsqldb:file:target/temp/data/portaltck}"/>
- <property name="username" value="${jdbcjcrtck.username:sa}"/>
- <property name="password" value="${jdbcjcrtck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export1"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export2"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export3"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>testdbcleaner</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${testdbcleaner.url:jdbc:hsqldb:file:target/temp/data/testdbcleaner}"/>
- <property name="username" value="${testdbcleaner.username:sa}"/>
- <property name="password" value="${testdbcleaner.password:}"/>
- <property name="maxActive" value="20" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.jcr</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>repo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.jcr.Repository</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="repositoryName" value="db1"/>
- <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>rmi.jcr</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>rmirepository</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.jcr.Repository</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.exoplatform.services.jcr.rmi.RepositoryFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="url" value="//localhost:9999/repository"/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
- <!--<import>jar:/conf/database-configuration.hsql.xml</import> -->
-</configuration>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,665 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
- xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
- <component>
- <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
- <value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="INFO, stdout, file"/>
-
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
- <property name="log4j.appender.stdout.threshold" value="DEBUG"/>
-
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.stdout.layout.ConversionPattern"
- value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
-
- <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
- <property name="log4j.appender.file.File" value="target/jcr.log"/>
-
- <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
- <property name="log4j.appender.file.layout.ConversionPattern"
- value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
-
- <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
- <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
- </properties-param>
-
- <!-- value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedSimpleLog</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.SimpleLogConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>SimpleLog properties</description>
- <property name="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
- <property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
- </properties-param -->
-
- <!-- value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedJdk14Logger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>jdk1.4 Logger properties</description>
- <property name="handlers" value="java.util.logging.ConsoleHandler"/>
- <property name=".level" value="FINE"/>
- <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
- </properties-param -->
-
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.RepositoryService</key>
- <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
- <component-plugins>
- <component-plugin>
- <name>add.namespaces</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
- <init-params>
- <properties-param>
- <name>namespaces</name>
- <property name="test" value="http://www.apache.org/jackrabbit/test"/>
- <property name="exojcrtest" value="http://www.exoplatform.org/jcr/test/1.0"/>
- <property name="rma" value="http://www.rma.com/jcr/"/>
- <property name="metadata" value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
- <property name="dc" value="http://purl.org/dc/elements/1.1/"/>
- <property name="publication" value="http://www.exoplatform.com/jcr/publication/1.1/"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>add.nodeType</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
- <init-params>
- <values-param>
- <name>autoCreatedInNewRepository</name>
- <description>Node types configuration file</description>
- <value>jar:/conf/test/nodetypes-tck.xml</value>
- <value>jar:/conf/test/nodetypes-impl.xml</value>
- <value>jar:/conf/test/nodetypes-usecase.xml</value>
- <value>jar:/conf/test/nodetypes-config.xml</value>
- <value>jar:/conf/test/nodetypes-config-extended.xml</value>
- <value>jar:/conf/test/wcm-nodetypes.xml</value>
- <value>jar:/conf/test/nodetypes-publication-config.xml</value>
- <value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
- </values-param>
-
- <values-param>
- <name>testInitNodeTypesRepository</name>
- <description>
- Node types configuration file for repository with name testInitNodeTypesRepository
- </description>
- <value>jar:/conf/test/nodetypes-test.xml</value>
- </values-param>
-
- <values-param>
- <name>testInitNodeTypesRepositoryTest2</name>
- <description>
- Node types configuration file for repository with name testInitNodeTypesRepositoryTest2
- </description>
- <value>jar:/conf/test/nodetypes-test2.xml</value>
- </values-param>
-
- <!--values-param>
- <name>testInitNodeTypesRepositoryTest3</name>
- <description>Node types from ext. Needed bacause core starup earlie than ext</description>
- <value>jar:/conf/test/nodetypes-test3_ext.xml</value>
- </values-param-->
-
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>jar:/conf/standalone/test-jcr-config.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="dialect" value="auto" />
- <property name="source-name" value="jdbcjcr"/>
- <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.security.Authenticator</key>
- <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
- </component>
-
- <component>
- <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>3000</value>
- </value-param>
- </init-params>
- </component>
-
- <!-- component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>300</value>
- </value-param>
- </init-params>
- </component -->
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <!-- MVCC configured to prevent possible deadlocks when a global Tx is active -->
- <property name="url" value="${jdbcjcr.url:jdbc:hsqldb:file:target/temp/data/portal;hsqldb.tx=mvcc}"/>
- <property name="username" value="${jdbcjcr.username:sa}"/>
- <property name="password" value="${jdbcjcr.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr1.url:jdbc:hsqldb:file:target/temp/data/jcr}"/>
- <property name="username" value="${jdbcjcr1.username:sa}"/>
- <property name="password" value="${jdbcjcr1.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr2.url:jdbc:hsqldb:file:target/temp/data/jcr2}"/>
- <property name="username" value="${jdbcjcr2.username:sa}"/>
- <property name="password" value="${jdbcjcr2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr3.url:jdbc:hsqldb:file:target/temp/data/jcr3}"/>
- <property name="username" value="${jdbcjcr3.username:sa}"/>
- <property name="password" value="${jdbcjcr3.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrtest</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- <property name="maxActive" value="100" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrdb2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcrdb2.url:jdbc:hsqldb:file:target/temp/data/portaldb2}"/>
- <property name="username" value="${jdbcjcrdb2.username:sa}"/>
- <property name="password" value="${jdbcjcrdb2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1db2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr1db2.url:jdbc:hsqldb:file:target/temp/data/jcrdb2}"/>
- <property name="username" value="${jdbcjcr1db2.username:sa}"/>
- <property name="password" value="${jdbcjcr1db2.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcrtck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcrtck.url:jdbc:hsqldb:file:target/temp/data/portaltck}"/>
- <property name="username" value="${jdbcjcrtck.username:sa}"/>
- <property name="password" value="${jdbcjcrtck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1tck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr1tck.url:jdbc:hsqldb:file:target/temp/data/jcrtck}"/>
- <property name="username" value="${jdbcjcr1tck.username:sa}"/>
- <property name="password" value="${jdbcjcr1tck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2tck</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${jdbcjcr2tck.url:jdbc:hsqldb:file:target/temp/data/jcr2tck}"/>
- <property name="username" value="${jdbcjcr2tck.username:sa}"/>
- <property name="password" value="${jdbcjcr2tck.password:}"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export1"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export2"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2export3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export3"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>testdbcleaner</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
- <property name="url" value="${testdbcleaner.url:jdbc:hsqldb:file:target/temp/data/testdbcleaner}"/>
- <property name="username" value="${testdbcleaner.username:sa}"/>
- <property name="password" value="${testdbcleaner.password:}"/>
- <property name="maxActive" value="20" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.jcr</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>repo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.jcr.Repository</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="repositoryName" value="db1"/>
- <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>rmi.jcr</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>rmirepository</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.jcr.Repository</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.exoplatform.services.jcr.rmi.RepositoryFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="url" value="//localhost:9999/repository"/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
- <!--<import>jar:/conf/database-configuration.hsql.xml</import> -->
-</configuration>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-config.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
- </global>
-
- <default>
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="LRU" threadPolicy="DEFAULT" maxEntries="1000000"/>
- <expiration wakeUpInterval="5000"/>
- </default>
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-lock.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-lock.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-lock.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<infinispan
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
- xmlns="urn:infinispan:config:5.0">
-
- <global>
- <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
- <properties>
- <property name="threadNamePrefix" value="EvictionThread"/>
- </properties>
- </evictionScheduledExecutor>
-
- <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
- </global>
-
- <default>
- <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
- <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
- <jmxStatistics enabled="true"/>
- <eviction strategy="NONE"/>
-
- <loaders passivation="false" shared="true" preload="true">
- <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" 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}"/>
- <property name="dataColumnName" value="${infinispan-cl-cache.jdbc.data.column}"/>
- <property name="timestampColumnName" value="${infinispan-cl-cache.jdbc.timestamp.column}"/>
- <property name="idColumnType" value="${infinispan-cl-cache.jdbc.id.type}"/>
- <property name="dataColumnType" value="${infinispan-cl-cache.jdbc.data.type}"/>
- <property name="timestampColumnType" value="${infinispan-cl-cache.jdbc.timestamp.type}"/>
- <property name="dropTableOnExit" value="${infinispan-cl-cache.jdbc.table.drop}"/>
- <property name="createTableOnStart" value="${infinispan-cl-cache.jdbc.table.create}"/>
- <property name="connectionFactoryClass" value="${infinispan-cl-cache.jdbc.connectionFactory}"/>
- <property name="datasourceJndiLocation" value="${infinispan-cl-cache.jdbc.datasource}"/>
- </properties>
- <async enabled="false"/>
- </loader>
- </loaders>
- </default>
-
-</infinispan>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,589 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-<repository-service default-repository="db1">
- <repositories>
- <repository name="db1" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="jdbc-dialect" value="auto" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws1" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws2" lazy-read-threshold="1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2" />
- </properties>
- <value-storages>
- <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws2" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws3">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws3" />
- </properties>
- <value-storages>
- <!--
- This storage is used to check whether properties are removed
- correctly from each value-storage
- (TestRemoveFromValueStorage.java)
- -->
- <value-storage id="ws3_big" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3_big" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="1024K" />
- </filters>
- </value-storage>
- <value-storage id="ws3" class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws3" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
-
- <repository name="db2" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrdb2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/wsdb2" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/wsdb2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db2/ws" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrdb2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1db2" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1db2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;any add_node;any set_property;any remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db2/ws1" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
-
-
- <repository name="db1tck" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrtck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/wstck" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/wstck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1tck/ws" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrtck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1tck" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1tck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1tck/ws1" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws2">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrtck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2tck" />
- </properties>
- <value-storages>
- <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2tck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1tck/ws2" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt"/>
- <property name="extractorPoolSize" value="2"/>
- <property name="extractorTimeout" value="10"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service>
Deleted: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -1,589 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-<repository-service default-repository="db1">
- <repositories>
- <repository name="db1" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="jdbc-dialect" value="auto" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws1" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws2" lazy-read-threshold="1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2" />
- </properties>
- <value-storages>
- <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws2" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws3">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr3" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws3" />
- </properties>
- <value-storages>
- <!--
- This storage is used to check whether properties are removed
- correctly from each value-storage
- (TestRemoveFromValueStorage.java)
- -->
- <value-storage id="ws3_big" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3_big" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="1024K" />
- </filters>
- </value-storage>
- <value-storage id="ws3" class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3" />
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
- <property name="jdbc-source-name" value="jdbcjcr" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1/ws3" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr3" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
-
- <repository name="db2" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrdb2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/wsdb2" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/wsdb2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db2/ws" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1db2" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1db2" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1db2" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;any add_node;any set_property;any remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db2/ws1" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1db2" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
-
-
- <repository name="db1tck" system-workspace="ws" default-workspace="ws">
- <security-domain>exo-domain</security-domain>
- <!-- access-control>optional</access-control -->
- <!-- access-control>disable</access-control -->
- <session-max-age>1h</session-max-age>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="ws">
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcrtck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/wstck" />
- </properties>
- <value-storages>
- <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/wstck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1tck/ws" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1tck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws1tck" />
- </properties>
- <value-storages>
- <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws1tck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1tck/ws1" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1tck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
-
- <workspace name="ws2">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr2tck" />
- <property name="dialect" value="auto" />
- <property name="multi-db" value="true" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="target/temp/swap/ws2tck" />
- </properties>
- <value-storages>
- <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws2tck" />
- <property name="enabled" value="${value-storage-enabled}" />
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="100K" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
- <properties>
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index/db1tck/ws2" />
- <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
- <property name="synonymprovider-config-path" value="../../synonyms.properties" />
- <property name="support-highlighting" value="true" />
- <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
- <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
- <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
- <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt"/>
- <property name="extractorPoolSize" value="2"/>
- <property name="extractorTimeout" value="10"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
- <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
- <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
- <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
- <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
- <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
- <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
- <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2tck" />
- <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
- </properties>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/pom.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,722 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>jcr-parent</artifactId>
+ <version>1.14.6-GA-SNAPSHOT</version>
+ </parent>
+ <artifactId>exo.jcr.component.core.impl.infinispan.v5</artifactId>
+ <name>eXo JCR :: Component :: Core Service based on ISPN 5</name>
+ <description>eXo JCR Service core component based on Infinispan 5</description>
+ <properties>
+ <jcr.test.configuration.file>/conf/standalone/test-configuration.xml</jcr.test.configuration.file>
+ <cache.enabled>true</cache.enabled>
+ <value.storage.enabled>true</value.storage.enabled>
+ <statistics.enabled>false</statistics.enabled>
+ <properties.url.suffix>.properties</properties.url.suffix>
+ <properties.url.prefix>classpath:/conf/standalone/default</properties.url.prefix>
+ <test.cache.all>**/persistent/cache/**</test.cache.all>
+ <!-- ispn specific exclude by default -->
+ <test.cache.exclude>**/persistent/cache/jbosscache/**</test.cache.exclude>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.commons</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.cluster.testclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons.test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.ext.rpc.impl.jgroups.v3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.core</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.core</artifactId>
+ <classifier>test-sources</classifier>
+ <scope>test</scope>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-jcr-tests</artifactId>
+ <classifier>sources</classifier>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- Excludes jboss-logging-spi since it is in conflict with the
+ latest version that is required by infinispan -->
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- TCK binaries and deps for repo stub, some eXo API test -->
+ <dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-cachestore-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- ===== Databases JDBC support for tests ===== -->
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <!-- ======================================================================= -->
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.xml</include>
+ <include>**/*.sql</include>
+ <include>**/*.dtd</include>
+ </includes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>login.conf</include>
+ <include>**/*.xml</include>
+ <include>**/*.drl</include>
+ <include>**/*.vm</include>
+ <include>**/*.doc</include>
+ <include>**/*.xls</include>
+ <include>**/*.ppt</include>
+ <include>**/*.txt</include>
+ <include>**/*.tiff</include>
+ <include>**/*.pdf</include>
+ <include>**/*.dtd</include>
+ <include>**/*.policy</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <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>
+ <name>jcr.test.configuration.file</name>
+ <value>${jcr.test.configuration.file}</value>
+ </property>
+ <property>
+ <name>emma.coverage.out.file</name>
+ <value>target/emma/coverage.ec</value>
+ </property>
+ <property>
+ <name>cache-enabled</name>
+ <value>${cache.enabled}</value>
+ </property>
+ <property>
+ <name>value-storage-enabled</name>
+ <value>${value.storage.enabled}</value>
+ </property>
+ <property>
+ <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
+ <value>${statistics.enabled}</value>
+ </property>
+ <property>
+ <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-->
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ <!-- Avoid the firewall -->
+ <property>
+ <name>jgroups.bind_addr</name>
+ <value>127.0.0.1</value>
+ </property>
+ </systemProperties>
+ <includes>
+ <include>org/exoplatform/services/jcr/api/**/Test*.java</include>
+ <include>org/exoplatform/services/jcr/usecases/**/Test*.java</include>
+ <include>org/exoplatform/services/jcr/usecases/**/*Test.java</include>
+ <include>org/exoplatform/services/jcr/impl/**/Test*.java</include>
+ </includes>
+ <excludes>
+ <exclude>org/exoplatform/services/jcr/**/api/TestAll.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/usecases/BaseUsecasesTest.java</exclude>
+ <exclude>org/exoplatform/services/jcr/usecases/common/RemoveSameNameSiblingUnfixedTest.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/impl/**/SQLBenchmarkTest.java</exclude>
+ <!-- Implementation Specific Excludes -->
+ <exclude>${test.cache.exclude}</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.core</artifactId>
+ <classifier>test-sources</classifier>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-jcr-tests</artifactId>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/jcr-core-tests</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>prepare-test-policy</id>
+ <phase>process-test-resources</phase>
+ <configuration>
+ <tasks>
+ <echo>Creating Access Policy for tests</echo>
+ <makeurl file="${settings.localRepository}" property="localRepositoryURL" />
+ <makeurl file="${project.build.outputDirectory}" property="outputDirectoryURL" />
+ <makeurl file="${project.build.testOutputDirectory}" property="testOutputDirectoryURL" />
+ <copy todir="${project.build.testOutputDirectory}" overwrite="true">
+ <fileset dir="${project.basedir}/src/test/resources/">
+ <include name="test.policy" />
+ </fileset>
+ <filterset>
+ <filter token="MAVEN_REPO" value="${localRepositoryURL}" />
+ <filter token="MAIN_CLASSES" value="${outputDirectoryURL}" />
+ <filter token="TEST_CLASSES" value="${testOutputDirectoryURL}" />
+ </filterset>
+ </copy>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-optional</artifactId>
+ <version>1.5.3-1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>add-test-resource</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/jcr-core-tests</directory>
+ <excludes>
+ </excludes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-test-source</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/jcr-core-tests</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <!-- *** -->
+ <!-- TCK -->
+ <!-- *** -->
+ <!-- Use "mvn -Prun-tck" to launch only them -->
+ <profile>
+ <id>run-tck</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- TAKE CARE TO UPDATE ALSO run-all 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</argLine>
+ <systemProperties>
+ <property>
+ <name>jcr.test.configuration.file</name>
+ <value>${jcr.test.configuration.file}</value>
+ </property>
+ <property>
+ <name>emma.coverage.out.file</name>
+ <value>target/emma/coverage.ec</value>
+ </property>
+ <property>
+ <name>cache-enabled</name>
+ <value>${cache.enabled}</value>
+ </property>
+ <property>
+ <name>value-storage-enabled</name>
+ <value>${value.storage.enabled}</value>
+ </property>
+ <property>
+ <name>known.issues</name>
+ <value>org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreName
+ org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreOrder2
+ org.apache.jackrabbit.test.api.nodetype.PropertyDefTest#testIsRequiredType
+ org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersionable
+ org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersion</value>
+ </property>
+ <property>
+ <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
+ <value>${statistics.enabled}</value>
+ </property>
+ <property>
+ <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-->
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ <!-- Avoid the firewall -->
+ <property>
+ <name>jgroups.bind_addr</name>
+ <value>127.0.0.1</value>
+ </property>
+ </systemProperties>
+ <includes>
+ <include>org/apache/jackrabbit/test/api/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/observation/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/lock/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/nodetype/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/query/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/version/*Test.java</include>
+ </includes>
+ <excludes>
+ <exclude>org/apache/jackrabbit/test/api/TestAll.java</exclude>
+ <exclude>org/apache/jackrabbit/test/api/**/Abstract*.java</exclude>
+ <exclude>org/apache/jackrabbit/test/api/**/FrozenNodeTest.java</exclude>
+ <exclude>org/exoplatform/services/jcr/impl/core/security/Test*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <!-- *** -->
+ <!-- ALL -->
+ <!-- *** -->
+ <!-- Use "mvn -Prun-all" to launch default tests and TCK -->
+ <profile>
+ <id>run-all</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <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</argLine>
+ <systemProperties>
+ <property>
+ <name>jcr.test.configuration.file</name>
+ <value>${jcr.test.configuration.file}</value>
+ </property>
+ <property>
+ <name>emma.coverage.out.file</name>
+ <value>target/emma/coverage.ec</value>
+ </property>
+ <property>
+ <name>cache-enabled</name>
+ <value>${cache.enabled}</value>
+ </property>
+ <property>
+ <name>value-storage-enabled</name>
+ <value>${value.storage.enabled}</value>
+ </property>
+ <property>
+ <name>known.issues</name>
+ <value>org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreName
+ org.apache.jackrabbit.test.api.version.RestoreTest#testRestoreOrder2
+ org.apache.jackrabbit.test.api.nodetype.PropertyDefTest#testIsRequiredType
+ org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersionable
+ org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest#testVersion</value>
+ </property>
+ <property>
+ <name>JDBCWorkspaceDataContainer.statistics.enabled</name>
+ <value>${statistics.enabled}</value>
+ </property>
+ <property>
+ <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-->
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ <!-- Avoid the firewall -->
+ <property>
+ <name>jgroups.bind_addr</name>
+ <value>127.0.0.1</value>
+ </property>
+ </systemProperties>
+ <includes>
+ <!-- From default tests -->
+ <include>org/exoplatform/services/jcr/api/**/Test*.java</include>
+ <include>org/exoplatform/services/jcr/usecases/**/Test*.java</include>
+ <include>org/exoplatform/services/jcr/usecases/**/*Test.java</include>
+ <include>org/exoplatform/services/jcr/impl/**/Test*.java</include>
+ <!-- From TCK -->
+ <include>org/apache/jackrabbit/test/api/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/observation/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/lock/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/nodetype/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/query/*Test.java</include>
+ <include>org/apache/jackrabbit/test/api/version/*Test.java</include>
+ </includes>
+ <excludes>
+ <exclude>org/exoplatform/services/jcr/**/api/TestAll.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/impl/**/Base*.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/usecases/BaseUsecasesTest.java</exclude>
+ <exclude>org/exoplatform/services/jcr/usecases/common/RemoveSameNameSiblingUnfixedTest.java</exclude>
+ <exclude>org/exoplatform/services/jcr/**/impl/**/SQLBenchmarkTest.java</exclude>
+ <!-- From TCK -->
+ <exclude>org/apache/jackrabbit/test/api/TestAll.java</exclude>
+ <exclude>org/apache/jackrabbit/test/api/**/Abstract*.java</exclude>
+ <exclude>org/apache/jackrabbit/test/api/**/FrozenNodeTest.java</exclude>
+ <!-- Implementation Specific Excludes -->
+ <exclude>${test.cache.exclude}</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <!-- We define one profile per driver -->
+ <profile>
+ <id>oracle-10G-R2</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>ojdbc</groupId>
+ <artifactId>ojdbc</artifactId>
+ <version>10.2.0.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ojdbc</groupId>
+ <artifactId>orai18n</artifactId>
+ <version>10.2.0.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>oracle-11G-R1</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>ojdbc</groupId>
+ <artifactId>ojdbc</artifactId>
+ <version>11.1.0.6.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ojdbc</groupId>
+ <artifactId>orai18n</artifactId>
+ <version>11.1.0.6.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>oracle-11G-R2</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/oracle</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>ojdbc</groupId>
+ <artifactId>ojdbc</artifactId>
+ <version>11.2.0.1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ojdbc</groupId>
+ <artifactId>orai18n</artifactId>
+ <version>11.2.0.1.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>mysql-5.0</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.8</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>mysql-5.1</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.14</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>mysql-5.5</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/mysql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.18</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>mssql</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/mssql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.microsoft</groupId>
+ <artifactId>sqljdbc</artifactId>
+ <version>3.0.1301.101</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>db2</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/db2</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm.db2</groupId>
+ <artifactId>db2jcc</artifactId>
+ <version>9.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.db2</groupId>
+ <artifactId>db2jcc_license_cu</artifactId>
+ <version>9.7</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>sybase</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/sybase</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.sybase.jdbc4.jdbc</groupId>
+ <artifactId>jconn4</artifactId>
+ <version>26502</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>pgsql-8.2</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-507.jdbc4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>pgsql-8.3</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.3-606.jdbc4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>pgsql-8.4</id>
+ <properties>
+ <properties.url.prefix>classpath:/conf/standalone/pgsql</properties.url.prefix>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.4-702.jdbc4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>cache-disabled</id>
+ <properties>
+ <cache.enabled>false</cache.enabled>
+ <test.cache.exclude>${test.cache.all}</test.cache.exclude>
+ </properties>
+ </profile>
+ <profile>
+ <id>value-storage-disabled</id>
+ <properties>
+ <value.storage.enabled>false</value.storage.enabled>
+ </properties>
+ </profile>
+ <profile>
+ <id>sjdbc</id>
+ <properties>
+ <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>
+ <id>cluster</id>
+ <properties>
+ <jcr.test.configuration.file>/conf/standalone/cluster/test-configuration.xml</jcr.test.configuration.file>
+ </properties>
+ </profile>
+ </profiles>
+</project>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,452 @@
+/*
+ *
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.infinispan;
+
+import org.exoplatform.commons.utils.SecurityHelper;
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.impl.core.lock.LockRemoverHolder;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.AbstractCacheableLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.CacheableSessionLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.LockData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
+import org.exoplatform.services.jcr.infinispan.PrivilegedISPNCacheHelper;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.naming.InitialContextInitializer;
+import org.exoplatform.services.transaction.TransactionService;
+import org.infinispan.Cache;
+import org.infinispan.config.Configuration.CacheMode;
+import org.infinispan.lifecycle.ComponentStatus;
+
+import java.io.Serializable;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+
+/**
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: InfinispanLockManagerImpl.java 111 2010-11-11 11:11:11Z tolusha $
+ */
+ at Managed
+ at NameTemplate(@Property(key = "service", value = "lockmanager"))
+public class ISPNCacheableLockManagerImpl extends AbstractCacheableLockManager
+{
+
+ /**
+ * The name to property cache configuration.
+ */
+ public static final String INFINISPAN_JDBC_CL_DATASOURCE = "infinispan-cl-cache.jdbc.datasource";
+
+ public static final String INFINISPAN_JDBC_CL_DATA_COLUMN = "infinispan-cl-cache.jdbc.data.type";
+
+ public static final String INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN = "infinispan-cl-cache.jdbc.timestamp.type";
+
+ public static final String INFINISPAN_JDBC_CL_ID_COLUMN = "infinispan-cl-cache.jdbc.id.type";
+
+ public static final String INFINISPAN_JDBC_TABLE_NAME = "infinispan-cl-cache.jdbc.table.name";
+
+ public static final String INFINISPAN_JDBC_CL_AUTO = "auto";
+
+ /**
+ * Logger
+ */
+ private final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.InfinispanLockManagerImpl");
+
+ private Cache<Serializable, Object> cache;
+
+ public ISPNCacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ InitialContextInitializer context, TransactionService transactionService, ConfigurationManager cfm,
+ LockRemoverHolder lockRemoverHolder) throws RepositoryConfigurationException, RepositoryException
+ {
+ this(dataManager, config, context, transactionService.getTransactionManager(), cfm, lockRemoverHolder);
+ }
+
+ public ISPNCacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ InitialContextInitializer context, ConfigurationManager cfm, LockRemoverHolder lockRemoverHolder)
+ throws RepositoryConfigurationException, RepositoryException
+ {
+ this(dataManager, config, context, (TransactionManager)null, cfm, lockRemoverHolder);
+ }
+
+ public ISPNCacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ InitialContextInitializer context, TransactionManager transactionManager, ConfigurationManager cfm,
+ LockRemoverHolder lockRemoverHolder) throws RepositoryConfigurationException, RepositoryException
+ {
+ super(dataManager, config, transactionManager, lockRemoverHolder);
+
+ // make cache
+ if (config.getLockManager() != null)
+ {
+ // create cache using custom factory
+ ISPNCacheFactory<Serializable, Object> factory = new ISPNCacheFactory<Serializable, Object>(cfm);
+
+ // configure cache loader parameters with correct DB data-types
+ configureJDBCCacheLoader(config.getLockManager());
+
+ cache = factory.createCache("L" + config.getUniqueName().replace("_", ""), config.getLockManager());
+ }
+ else
+ {
+ throw new RepositoryConfigurationException("Cache configuration not found");
+ }
+
+ this.getNumLocks = new LockActionNonTxAware<Integer, Object>()
+ {
+ public Integer execute(Object arg)
+ {
+ return cache.size();
+ }
+ };
+
+ this.hasLocks = new LockActionNonTxAware<Boolean, Object>()
+ {
+ public Boolean execute(Object arg)
+ {
+ return !cache.isEmpty();
+ }
+ };
+
+ this.isLockLive = new LockActionNonTxAware<Boolean, String>()
+ {
+ public Boolean execute(String nodeId)
+ {
+ return cache.containsKey(nodeId);
+ }
+ };
+
+ this.refresh = new LockActionNonTxAware<Object, LockData>()
+ {
+ public Object execute(LockData newLockData) throws LockException
+ {
+ Object oldValue = PrivilegedISPNCacheHelper.put(cache, newLockData.getNodeIdentifier(), newLockData);
+ if (oldValue == null)
+ {
+ throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
+ + " since lock is not exist");
+ }
+ return null;
+ }
+ };
+
+ this.lockExist = new LockActionNonTxAware<Boolean, String>()
+ {
+ public Boolean execute(String nodeId) throws LockException
+ {
+ return cache.containsKey(nodeId);
+ }
+ };
+
+ this.getLockDataById = new LockActionNonTxAware<LockData, String>()
+ {
+ public LockData execute(String nodeId) throws LockException
+ {
+ return (LockData)cache.get(nodeId);
+ }
+ };
+
+ this.getLockList = new LockActionNonTxAware<List<LockData>, Object>()
+ {
+ public List<LockData> execute(Object arg) throws LockException
+ {
+ Collection<Object> datas = cache.values();
+
+ List<LockData> locksData = new ArrayList<LockData>();
+ for (Object lockData : datas)
+ {
+ if (lockData != null)
+ {
+ locksData.add((LockData)lockData);
+ }
+ }
+ return locksData;
+ }
+ };
+ }
+
+ /**
+ * If JDBC cache loader is used, then fills-in column types. If column type configured from jcr-configuration file,
+ * then nothing is overridden. Parameters are injected into the given parameterEntry.
+ */
+ private void configureJDBCCacheLoader(MappedParametrizedObjectEntry parameterEntry) throws RepositoryException
+ {
+ String dataSourceName = parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATASOURCE, null);
+ // if data source is defined, then inject correct data-types.
+ // Also it cans be not defined and nothing should be injected
+ //(i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
+ if (dataSourceName != null)
+ {
+ String dialect;
+ // detect dialect of data-source
+ try
+ {
+ final DataSource dataSource = (DataSource)new InitialContext().lookup(dataSourceName);
+ if (dataSource == null)
+ {
+ throw new RepositoryException("DataSource (" + dataSourceName + ") can't be null");
+ }
+
+ Connection jdbcConn = null;
+ try
+ {
+ PrivilegedExceptionAction<Connection> action = new PrivilegedExceptionAction<Connection>()
+ {
+ public Connection run() throws Exception
+ {
+ return dataSource.getConnection();
+ }
+ };
+ try
+ {
+ jdbcConn = SecurityHelper.doPrivilegedExceptionAction(action);
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof SQLException)
+ {
+ throw (SQLException)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ }
+
+ dialect = DialectDetecter.detect(jdbcConn.getMetaData());
+ }
+ finally
+ {
+ if (jdbcConn != null && !jdbcConn.isClosed())
+ {
+ try
+ {
+ jdbcConn.close();
+ }
+ catch (SQLException e)
+ {
+ throw new RepositoryException("Error of connection close", e);
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RepositoryException("Error configuring JDBC cache loader", e);
+ }
+
+ // default values, will be overridden with types suitable for concrete data base.
+ String blobType = "BLOB";
+ String charType = "VARCHAR(512)";
+ String timeStampType = "BIGINT";
+ // HSSQL
+ if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_HSQLDB))
+ {
+ blobType = "VARBINARY(65535)";
+ }
+ // MYSQL
+ else if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_MYSQL)
+ || dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_MYSQL_UTF8)
+ || dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_MYSQL_MYISAM)
+ || dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_MYSQL_MYISAM_UTF8))
+ {
+ blobType = "LONGBLOB";
+ }
+ // ORACLE
+ else if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLE)
+ || dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLEOCI))
+ {
+ // Oracle suggests the use VARCHAR2 instead of VARCHAR while declaring data type.
+ charType = "VARCHAR2(512)";
+ timeStampType = "NUMBER(19, 0)";
+ }
+ // POSTGRE SQL
+ else if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_PGSQL))
+ {
+ blobType = "bytea";
+ }
+ // Microsoft SQL
+ else if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_MSSQL))
+ {
+ blobType = "VARBINARY(MAX)";
+ }
+ // SYBASE
+ else if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_SYBASE))
+ {
+ blobType = "IMAGE";
+ }
+ // INGRES
+ else if (dialect.equalsIgnoreCase(DBConstants.DB_DIALECT_INGRES))
+ {
+ blobType = "long byte";
+ }
+ // else GENERIC, DB2 etc
+
+ // set parameters if not defined
+ // if parameter is missing in configuration, then
+ // getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ // will return INFINISPAN_JDBC_CL_AUTO. If parameter is present in configuration and
+ //equals to "auto", then it should be replaced
+ // with correct value for given database
+ if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ .equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
+ {
+ parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, blobType);
+ }
+
+ if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_ID_COLUMN, INFINISPAN_JDBC_CL_AUTO).equalsIgnoreCase(
+ INFINISPAN_JDBC_CL_AUTO))
+ {
+ parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_ID_COLUMN, charType);
+ }
+
+ if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ .equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
+ {
+ parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN, timeStampType);
+ }
+ }
+ else
+ {
+ LOG.warn("CacheLoader DataSource " + INFINISPAN_JDBC_CL_DATASOURCE + " is not configured.");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop()
+ {
+ super.stop();
+ PrivilegedISPNCacheHelper.stop(cache);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected synchronized void internalLock(String sessionId, String nodeIdentifier) throws LockException
+ {
+ CacheableSessionLockManager session = sessionLockManagers.get(sessionId);
+ if (session != null && session.containsPendingLock(nodeIdentifier))
+ {
+ LockData lockData = session.getPendingLock(nodeIdentifier);
+
+ // this will return null if success. And old data if something exists...
+ LockData oldLockData = doPut(lockData);
+
+ if (oldLockData != null)
+ {
+ throw new LockException("Unable to write LockData. Node [" + lockData.getNodeIdentifier()
+ + "] already has LockData!");
+ }
+
+ session.notifyLockPersisted(nodeIdentifier);
+ }
+ else
+ {
+ throw new LockException("No lock in pending locks");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected synchronized void internalUnLock(String sessionId, String nodeIdentifier) throws LockException
+ {
+ LockData lData = getLockDataById(nodeIdentifier);
+
+ if (lData != null)
+ {
+ doRemove(lData);
+
+ CacheableSessionLockManager sessMgr = sessionLockManagers.get(sessionId);
+ if (sessMgr != null)
+ {
+ sessMgr.notifyLockRemoved(nodeIdentifier);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected LockData doPut(LockData lockData)
+ {
+ return (LockData)PrivilegedISPNCacheHelper.putIfAbsent(cache, lockData.getNodeIdentifier(), lockData);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doRemove(LockData lockData)
+ {
+ cache.remove(lockData.getNodeIdentifier());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isAloneInCluster()
+ {
+ return cache.getConfiguration().getCacheMode() == CacheMode.LOCAL
+ || cache.getCacheManager().getMembers().size() == 1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doClean()
+ {
+ if (cache.getStatus() == ComponentStatus.RUNNING)
+ {
+ for (LockData lockData : getLockList())
+ {
+ doRemove(lockData);
+ }
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/AbstractIndexerCacheStore.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,252 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper;
+import org.exoplatform.services.jcr.impl.core.query.Indexer;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.impl.core.query.QueryHandler;
+import org.exoplatform.services.jcr.impl.core.query.SearchManager;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.infinispan.container.entries.InternalCacheEntry;
+import org.infinispan.context.Flag;
+import org.infinispan.loaders.AbstractCacheStore;
+import org.infinispan.loaders.AbstractCacheStoreConfig;
+import org.infinispan.loaders.CacheLoaderConfig;
+import org.infinispan.loaders.CacheLoaderException;
+
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+
+/**
+ * Abstract Indexer Cache Loader defines default implementation of data processing received via cache.
+ *
+ * @author <a href="mailto:nikolazius at gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: AbstractInputCacheStore.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public abstract class AbstractIndexerCacheStore extends AbstractCacheStore
+{
+
+ /**
+ * A map of all the indexers that has been registered
+ */
+ protected final Map<String, Indexer> indexers = new HashMap<String, Indexer>();
+
+ protected static final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.IndexerCacheLoader");
+
+ /**
+ * Executor used to remove all the entries that have already been treated. We
+ * need it because starting from ISPN 5.1 even changes applied in auto commit
+ * mode are done within a transaction so if we try to drop the entries
+ * directly we get an IllegalStateException because the operation is done
+ * during a commit and if we try to execute it outside the transaction we
+ * create a deadlock as the lock on the entry is hold by the suspended transaction
+ */
+ private static final ExecutorService EXECUTOR = Executors.newSingleThreadExecutor(new ThreadFactory()
+ {
+ private final ThreadGroup group;
+ {
+ SecurityManager s = System.getSecurityManager();
+ group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
+ }
+
+ public Thread newThread(Runnable r)
+ {
+ Thread t = new Thread(group, r, "IndexerCacheStoreCleaner", 0);
+ t.setDaemon(true);
+ return t;
+ }
+ });
+
+ /**
+ * This method will register a new Indexer according to the given parameters.
+ *
+ * @param searchManager
+ * @param parentSearchManager
+ * @param handler
+ * @param parentHandler
+ * @throws RepositoryConfigurationException
+ */
+ public void register(SearchManager searchManager, SearchManager parentSearchManager, QueryHandler handler,
+ QueryHandler parentHandler) throws RepositoryConfigurationException
+ {
+ indexers.put(searchManager.getWsId(), new Indexer(searchManager, parentSearchManager, handler,
+ parentHandler));
+ if (log.isDebugEnabled())
+ {
+ log.debug("Register " + searchManager.getWsId() + " " + this + " in " + indexers);
+ }
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheStore#store(org.infinispan.container.entries.InternalCacheEntry)
+ */
+ public void store(InternalCacheEntry entry) throws CacheLoaderException
+ {
+ if (entry.getKey() instanceof ChangesKey && entry.getValue() instanceof ChangesFilterListsWrapper)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.info("Received list wrapper, start indexing...");
+ }
+ // updating index
+ ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)entry.getValue();
+ final ChangesKey key = (ChangesKey)entry.getKey();
+ try
+ {
+ Indexer indexer = indexers.get(key.getWsId());
+ if (indexer == null)
+ {
+ log.warn("No indexer could be found for the cache entry " + key.toString());
+ if (log.isDebugEnabled())
+ {
+ log.debug("The current content of the map of indexers is " + indexers);
+ }
+ }
+ else if (wrapper.withChanges())
+ {
+ indexer.updateIndex(wrapper.getChanges(), wrapper.getParentChanges());
+ }
+ else
+ {
+ indexer.updateIndex(wrapper.getAddedNodes(), wrapper.getRemovedNodes(), wrapper.getParentAddedNodes(),
+ wrapper.getParentRemovedNodes());
+ }
+ }
+ finally
+ {
+ if (getModeHandler().getMode() == IndexerIoMode.READ_WRITE)
+ {
+ // remove the data from the cache
+ EXECUTOR.submit(new Runnable()
+ {
+ public void run()
+ {
+ cache.getAdvancedCache().withFlags(Flag.SKIP_LOCKING, Flag.FORCE_ASYNCHRONOUS, Flag.SKIP_REMOTE_LOOKUP).removeAsync(key);
+ }
+ });
+ }
+ }
+ }
+ }
+
+ /**
+ * @return IndexerIoModeHandler instance
+ */
+ public abstract IndexerIoModeHandler getModeHandler();
+
+ // ===================================================
+
+ /**
+ * @see org.infinispan.loaders.CacheLoader#getConfigurationClass()
+ */
+ public Class<? extends CacheLoaderConfig> getConfigurationClass()
+ {
+ return AbstractCacheStoreConfig.class;
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheStore#fromStream(java.io.ObjectInput)
+ */
+ public void fromStream(ObjectInput inputStream) throws CacheLoaderException
+ {
+ throw new UnsupportedOperationException("This operation is not supported by this component.");
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheStore#toStream(java.io.ObjectOutput)
+ */
+ public void toStream(ObjectOutput outputStream) throws CacheLoaderException
+ {
+ throw new UnsupportedOperationException("This operation is not supported by this component.");
+ }
+
+ /**
+ * @see org.infinispan.loaders.AbstractCacheStore#purgeInternal()
+ */
+ @Override
+ protected void purgeInternal() throws CacheLoaderException
+ {
+ // This cacheStore only accepts data
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheStore#clear()
+ */
+ public void clear() throws CacheLoaderException
+ {
+ throw new UnsupportedOperationException("This operation is not supported by this component.");
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheStore#remove(java.lang.Object)
+ */
+ public boolean remove(Object key) throws CacheLoaderException
+ {
+ // This cacheStore only accepts data
+ return true;
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheLoader#load(java.lang.Object)
+ */
+ public InternalCacheEntry load(Object key) throws CacheLoaderException
+ {
+ // This cacheStore only accepts data
+ return null;
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheLoader#load(int)
+ */
+ public Set<InternalCacheEntry> load(int numEntries) throws CacheLoaderException
+ {
+ // This cacheStore only accepts data
+ return null;
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheLoader#loadAll()
+ */
+ public Set<InternalCacheEntry> loadAll() throws CacheLoaderException
+ {
+ // This cacheStore only accepts data
+ return null;
+ }
+
+ /**
+ * @see org.infinispan.loaders.CacheLoader#loadAllKeys(java.util.Set)
+ */
+ public Set<Object> loadAllKeys(Set<Object> keysToExclude) throws CacheLoaderException
+ {
+ // This cacheStore only accepts data
+ return null;
+ }
+
+}
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ChangesKey.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,99 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.CacheKey;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * Date: 22.02.011
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: ChangesKey.java 34360 2010-11-11 11:11:11Z tolusha $
+ */
+public class ChangesKey extends CacheKey
+{
+ private String wsId;
+
+ ChangesKey()
+ {
+ super();
+ }
+
+ ChangesKey(String wsId, String id)
+ {
+ super(id);
+ this.wsId = wsId;
+ }
+
+ /**
+ * @return unique workspace identifier
+ */
+ public String getWsId()
+ {
+ return wsId;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ super.writeExternal(out);
+ byte[] buf = wsId.getBytes(Constants.DEFAULT_ENCODING);
+ out.writeInt(buf.length);
+ out.write(buf);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ super.readExternal(in);
+ byte[] buf = new byte[in.readInt()];
+ in.readFully(buf);
+ wsId = new String(buf, Constants.DEFAULT_ENCODING);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof ChangesKey)
+ {
+ ChangesKey key = (ChangesKey)obj;
+ return (key.hash == hash && key.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,128 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.services.jcr.config.QueryHandlerEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper;
+import org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.impl.core.query.IndexingTree;
+import org.exoplatform.services.jcr.impl.core.query.QueryHandler;
+import org.exoplatform.services.jcr.impl.core.query.SearchManager;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
+import org.exoplatform.services.jcr.util.IdGenerator;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.infinispan.Cache;
+import org.infinispan.context.Flag;
+import org.infinispan.loaders.CacheLoaderManager;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * Date: 23.02.2011
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: ISPNIndexChangesFilter.java 34360 2010-11-11 11:11:11Z tolusha $
+ */
+public class ISPNIndexChangesFilter extends IndexerChangesFilter
+{
+ /**
+ * Logger instance for this class.
+ */
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.ISPNIndexChangesFilter");
+
+ public static final String PARAM_INFINISPAN_CACHESTORE_CLASS = "infinispan-cachestore-classname";
+
+ /**
+ * ISPN cache.
+ */
+ private final Cache<Serializable, Object> cache;
+
+ /**
+ * Unique workspace identifier.
+ */
+ private final String wsId;
+
+ /**
+ * ISPNIndexChangesFilter constructor.
+ */
+ public ISPNIndexChangesFilter(SearchManager searchManager, SearchManager parentSearchManager,
+ QueryHandlerEntry config, IndexingTree indexingTree, IndexingTree parentIndexingTree, QueryHandler handler,
+ QueryHandler parentHandler, ConfigurationManager cfm) throws IOException, RepositoryException,
+ RepositoryConfigurationException
+ {
+ super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree, handler, parentHandler, cfm);
+
+ this.wsId = searchManager.getWsId();
+
+ ISPNCacheFactory<Serializable, Object> factory = new ISPNCacheFactory<Serializable, Object>(cfm);
+ config.putParameterValue(PARAM_INFINISPAN_CACHESTORE_CLASS, IndexerCacheStore.class.getName());
+ this.cache = factory.createCache("Indexer_" + searchManager.getWsId(), config);
+
+ CacheLoaderManager cacheLoaderManager =
+ cache.getAdvancedCache().getComponentRegistry().getComponent(CacheLoaderManager.class);
+ IndexerCacheStore cacheStore = (IndexerCacheStore)cacheLoaderManager.getCacheLoader();
+
+ cacheStore.register(searchManager, parentSearchManager, handler, parentHandler);
+ IndexerIoModeHandler modeHandler = cacheStore.getModeHandler();
+ handler.setIndexerIoModeHandler(modeHandler);
+ parentHandler.setIndexerIoModeHandler(modeHandler);
+
+ if (!parentHandler.isInitialized())
+ {
+ parentHandler.setIndexInfos(new ISPNIndexInfos(searchManager.getWsId(), cache, true, modeHandler));
+ parentHandler.setIndexUpdateMonitor(new ISPNIndexUpdateMonitor(searchManager.getWsId(), cache, true,
+ modeHandler));
+ parentHandler.init();
+ }
+ if (!handler.isInitialized())
+ {
+ handler.setIndexInfos(new ISPNIndexInfos(searchManager.getWsId(), cache, false, modeHandler));
+ handler.setIndexUpdateMonitor(new ISPNIndexUpdateMonitor(searchManager.getWsId(), cache, false, modeHandler));
+ handler.init();
+ }
+ }
+
+ protected Log getLogger()
+ {
+ return log;
+ }
+
+ protected void doUpdateIndex(ChangesFilterListsWrapper changes)
+ {
+ ChangesKey changesKey = new ChangesKey(wsId, IdGenerator.generate());
+ cache.getAdvancedCache().withFlags(Flag.SKIP_LOCKING).put(changesKey, changes);
+ }
+
+ /**
+ * @see org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter#isShared()
+ */
+ public boolean isShared()
+ {
+ return true;
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,232 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeListener;
+import org.exoplatform.services.jcr.impl.core.query.lucene.IndexInfos;
+import org.exoplatform.services.jcr.impl.core.query.lucene.MultiIndex;
+import org.exoplatform.services.jcr.infinispan.PrivilegedISPNCacheHelper;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.transaction.ActionNonTxAware;
+import org.infinispan.Cache;
+import org.infinispan.notifications.Listener;
+import org.infinispan.notifications.cachelistener.annotation.CacheEntryModified;
+import org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.transaction.TransactionManager;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * Date: 22.02.2011
+ *
+ * List of indexes is stored in FS and all operations with it are wrapped by IndexInfos class. In
+ * standalone mode index and so the list of indexes are managed by indexer and can't be changed
+ * externally.
+ * But in cluster environment all JCR Indexers are reading from shared file system and only one
+ * cluster node is writing this index. So read-only cluster nodes should be notified when content
+ * of index (actually list of index segments) is changed.
+ * This class is responsible for storing list of segments (indexes) in ISPN cache.
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: ISPNIndexInfos.java 34360 2010-11-11 11:11:11Z tolusha $
+ */
+ at Listener
+public class ISPNIndexInfos extends IndexInfos implements IndexerIoModeListener
+{
+
+ /**
+ * Logger.
+ */
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.ISPNIndexInfos");
+
+ private static final String INDEX_NAMES = "$names".intern();
+
+ private static final String SYSINDEX_NAMES = "$sysNames".intern();
+
+ /**
+ * ISPN cache.
+ */
+ private final Cache<Serializable, Object> cache;
+
+ /**
+ * Used to retrieve the current mode.
+ */
+ private final IndexerIoModeHandler modeHandler;
+
+ /**
+ * Cache key for storing index names.
+ */
+ private final IndexInfosKey namesKey;
+
+ /**
+ * Need to write the index info out of the current transaction
+ * due to the fact that even in auto commit mode, changes are now applied
+ * within a transaction starting from ISPN 5.1
+ */
+ private final ActionNonTxAware<Void, Void, RuntimeException> write =
+ new ActionNonTxAware<Void, Void, RuntimeException>()
+ {
+
+ @Override
+ protected TransactionManager getTransactionManager()
+ {
+ return cache.getAdvancedCache().getTransactionManager();
+ }
+
+ @Override
+ protected Void execute(Void arg) throws RuntimeException
+ {
+ PrivilegedISPNCacheHelper.put(cache, namesKey, getNames());
+ return null;
+ }
+ };
+
+ /**
+ * ISPNIndexInfos constructor.
+ *
+ * @param wsId
+ * unique workspace identifier
+ * @param cache
+ * ISPN cache
+ * @param system
+ * notifies if this IndexInfos is from system search manager or not
+ * @param modeHandler
+ * used to retrieve the current mode
+ */
+ public ISPNIndexInfos(String wsId, Cache<Serializable, Object> cache, boolean system,
+ IndexerIoModeHandler modeHandler)
+ {
+ this(wsId, DEFALUT_NAME, cache, system, modeHandler);
+ }
+
+ /**
+ * ISPNIndexInfos constructor.
+ *
+ * @param wsId
+ * unique workspace identifier
+ * @param fileName
+ * name of the file where the infos are stored.
+ * @param cache
+ * ISPN cache
+ * @param system
+ * notifies if this IndexInfos is from system search manager or not
+ * @param modeHandler
+ * used to retrieve the current mode
+ */
+ public ISPNIndexInfos(String wsId, String fileName, Cache<Serializable, Object> cache, boolean system,
+ IndexerIoModeHandler modeHandler)
+ {
+ super(fileName);
+ this.cache = cache;
+ this.modeHandler = modeHandler;
+ this.modeHandler.addIndexerIoModeListener(this);
+ this.namesKey = new IndexInfosKey(wsId + (system ? SYSINDEX_NAMES : INDEX_NAMES));
+
+ if (modeHandler.getMode() == IndexerIoMode.READ_ONLY)
+ {
+ // Currently READ_ONLY is set, so new lists should be fired to multiIndex.
+ cache.addListener(this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onChangeMode(IndexerIoMode mode)
+ {
+ if (mode == IndexerIoMode.READ_WRITE)
+ {
+ // Now is read-write. Index list is actual and shouldn't be refreshed.
+ // Remove listener to avoid asserting if ioMode is RO on each cache event
+ cache.removeListener(this);
+ // re-read from FS current actual list.
+ try
+ {
+ super.read();
+ }
+ catch (IOException e)
+ {
+ log.error("Cannot read the list of index names", e);
+ }
+ }
+ else
+ {
+ // Currently READ_ONLY is set, so new lists should be fired to multiIndex.
+ cache.addListener(this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void write() throws IOException
+ {
+ // if READ_WRITE and is dirty, then flush.
+ if (isDirty() && modeHandler.getMode() == IndexerIoMode.READ_WRITE)
+ {
+ // write to FS
+ super.write();
+
+ // write to cache
+ write.run();
+ }
+ }
+
+ /**
+ * Method will be invoked when a cache entry has been modified only in READ_ONLY mode.
+ *
+ * @param event
+ * CacheEntryModifiedEvent
+ */
+ @CacheEntryModified
+ public void cacheEntryModified(CacheEntryModifiedEvent event)
+ {
+ if (!event.isPre() && event.getKey().equals(namesKey))
+ {
+ Set<String> set = (Set<String>)event.getValue();
+ if (set != null)
+ {
+ setNames(set);
+
+ // callback multiIndex to refresh lists
+ try
+ {
+ MultiIndex multiIndex = getMultiIndex();
+ if (multiIndex != null)
+ {
+ multiIndex.refreshIndexList();
+ }
+ }
+ catch (IOException e)
+ {
+ log.error("Failed to update indexes! " + e.getMessage(), e);
+ }
+ }
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,231 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeListener;
+import org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor;
+import org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener;
+import org.exoplatform.services.jcr.infinispan.PrivilegedISPNCacheHelper;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.transaction.ActionNonTxAware;
+import org.infinispan.Cache;
+import org.infinispan.CacheException;
+import org.infinispan.notifications.Listener;
+import org.infinispan.notifications.cachelistener.annotation.CacheEntryModified;
+import org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import javax.transaction.TransactionManager;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * Date: 22.02.2011
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: ISPNIndexUpdateMonitor.java 34360 2010-11-11 11:11:11Z tolusha $
+ */
+ at Listener
+public class ISPNIndexUpdateMonitor implements IndexUpdateMonitor, IndexerIoModeListener
+{
+ /**
+ * Logger instance for this class
+ */
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.ISPNIndexUpdateMonitor");
+
+ /**
+ * ISPN cache.
+ */
+ private final Cache<Serializable, Object> cache;
+
+ private boolean localUpdateInProgress = false;
+
+ private static final String INDEX_PARAMETERS = "$index_parameters".intern();
+
+ private static final String SYSINDEX_PARAMETERS = "$sysindex_parameters".intern();
+
+ public final IndexerIoModeHandler modeHandler;
+
+ /**
+ * Need to set the flag "update in progress" out of the current transaction
+ * due to the fact that even in auto commit mode, changes are now applied
+ * within a transaction starting from ISPN 5.1
+ */
+ private final ActionNonTxAware<Void, Boolean, RuntimeException> setUpdateInProgress =
+ new ActionNonTxAware<Void, Boolean, RuntimeException>()
+ {
+
+ @Override
+ protected TransactionManager getTransactionManager()
+ {
+ return cache.getAdvancedCache().getTransactionManager();
+ }
+
+ @Override
+ protected Void execute(Boolean updateInProgress) throws RuntimeException
+ {
+ PrivilegedISPNCacheHelper.put(cache, updateKey, updateInProgress);
+ return null;
+ }
+ };
+
+ /**
+ * The list of all the listeners
+ */
+ private final List<IndexUpdateMonitorListener> listeners;
+
+ /**
+ * Cache key for sending notifications.
+ */
+ private final IndexUpdateKey updateKey;
+
+ /**
+ * ISPNIndexUpdateMonitor constructor.
+ *
+ * @param wsId
+ * unique workspace identifier
+ * @param cache
+ * ISPN cache
+ * @param system
+ * notifies if this IndexInfos is from system search manager or not
+ * @param modeHandler
+ * used to retrieve the current mode
+ */
+ public ISPNIndexUpdateMonitor(String wsId, Cache<Serializable, Object> cache, boolean system,
+ IndexerIoModeHandler modeHandler)
+ {
+ this.cache = cache;
+ this.modeHandler = modeHandler;
+ this.listeners = new CopyOnWriteArrayList<IndexUpdateMonitorListener>();
+ this.modeHandler.addIndexerIoModeListener(this);
+ this.updateKey = new IndexUpdateKey(wsId + (system ? SYSINDEX_PARAMETERS : INDEX_PARAMETERS));
+
+ if (IndexerIoMode.READ_WRITE == modeHandler.getMode())
+ {
+ // global, replicated set
+ setUpdateInProgress(false, true);
+ }
+ else
+ {
+ // Currently READ_ONLY is set, so new lists should be fired to multiIndex.
+ cache.addListener(this);
+ Object value = cache.get(updateKey);
+ localUpdateInProgress = value != null ? (Boolean)value : false;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onChangeMode(IndexerIoMode mode)
+ {
+ if (mode == IndexerIoMode.READ_WRITE)
+ {
+ // In READ_WRITE, the value of UpdateInProgress is changed locally so no need to listen
+ // to the cache
+ cache.removeListener(this);
+ }
+ else
+ {
+ // In READ_ONLY, the value of UpdateInProgress will be changed remotely, so we have
+ // no need but to listen to the cache to be notified when the value changes
+ cache.addListener(this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getUpdateInProgress()
+ {
+ return localUpdateInProgress;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setUpdateInProgress(boolean updateInProgress, boolean persitentUpdate)
+ {
+ if (IndexerIoMode.READ_ONLY == modeHandler.getMode())
+ {
+ throw new IllegalStateException("Unable to set updateInProgress value in IndexerIoMode.READ_ONLY mode");
+ }
+ try
+ {
+ // anyway set local update in progress
+ localUpdateInProgress = updateInProgress;
+ if (persitentUpdate)
+ {
+ setUpdateInProgress.run(new Boolean(updateInProgress));
+ }
+ for (IndexUpdateMonitorListener listener : listeners)
+ {
+ listener.onUpdateInProgressChange(updateInProgress);
+ }
+
+ }
+ catch (CacheException e)
+ {
+ log.error("Fail to change updateInProgress mode to " + updateInProgress, e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
+ {
+ listeners.add(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
+ {
+ listeners.remove(listener);
+ }
+
+ /**
+ * Method will be invoked when a cache entry has been modified only in READ_ONLY mode.
+ *
+ * @param event
+ * CacheEntryModifiedEvent
+ */
+ @CacheEntryModified
+ public void cacheEntryModified(CacheEntryModifiedEvent event)
+ {
+ if (!event.isPre() && event.getKey().equals(updateKey))
+ {
+ Object value = event.getValue();
+ localUpdateInProgress = value != null ? (Boolean)value : false;
+
+ for (IndexUpdateMonitorListener listener : listeners)
+ {
+ listener.onUpdateInProgressChange(localUpdateInProgress);
+ }
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexInfosKey.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.CacheKey;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * Date: 22.02.011
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: IndexNamesKey.java 34360 2010-11-11 11:11:11Z tolusha $
+ */
+public class IndexInfosKey extends CacheKey
+{
+ IndexInfosKey()
+ {
+ super();
+ }
+
+ IndexInfosKey(String id)
+ {
+ super(id);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof IndexInfosKey)
+ {
+ IndexInfosKey key = (IndexInfosKey)obj;
+ return (key.hash == hash && key.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexUpdateKey.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.CacheKey;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * Date: 22.02.011
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: IndexUpdateKey.java 34360 2010-11-11 11:11:11Z tolusha $
+ */
+public class IndexUpdateKey extends CacheKey
+{
+
+ IndexUpdateKey()
+ {
+ super();
+ }
+
+ IndexUpdateKey(String id)
+ {
+ super(id);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof IndexUpdateKey)
+ {
+ IndexUpdateKey key = (IndexUpdateKey)obj;
+ return (key.hash == hash && key.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/IndexerCacheStore.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,266 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.util.IdGenerator;
+import org.infinispan.Cache;
+import org.infinispan.config.Configuration.CacheMode;
+import org.infinispan.container.DataContainer;
+import org.infinispan.container.entries.InternalCacheEntry;
+import org.infinispan.lifecycle.ComponentStatus;
+import org.infinispan.loaders.CacheLoaderConfig;
+import org.infinispan.loaders.CacheLoaderException;
+import org.infinispan.manager.EmbeddedCacheManager;
+import org.infinispan.marshall.StreamingMarshaller;
+import org.infinispan.notifications.Listener;
+import org.infinispan.notifications.cachemanagerlistener.annotation.CacheStarted;
+import org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged;
+import org.infinispan.notifications.cachemanagerlistener.event.Event;
+import org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent;
+import org.infinispan.remoting.transport.Address;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+/**
+ * Implements Cache Store for clustered environment. It gives control of Index for coordinator and
+ * adds failover mechanisms when it changes.
+ *
+ * @author <a href="mailto:nikolazius at gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: IndexCacheLoader.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class IndexerCacheStore extends AbstractIndexerCacheStore
+{
+ protected volatile IndexerIoModeHandler modeHandler;
+
+ protected CacheListener listener;
+
+ /**
+ * Address instance that allows SingletonStore to find out whether it became the coordinator of the cluster, or
+ * whether it stopped being it. This dictates whether the SingletonStore is active or not.
+ */
+ private Address localAddress;
+
+ /**
+ * Whether the the current cache is the coordinator and therefore SingletonStore is active. Being active means
+ * delegating calls to the underlying cache loader.
+ */
+ private volatile boolean coordinator;
+
+ protected EmbeddedCacheManager cacheManager;
+
+ @Override
+ public void init(CacheLoaderConfig config, Cache<?, ?> cache, StreamingMarshaller m) throws CacheLoaderException
+ {
+ super.init(config, cache, m);
+ this.cacheManager = cache == null ? null : (EmbeddedCacheManager)cache.getCacheManager();
+ listener = new CacheListener();
+ cacheManager.addListener(listener);
+ }
+
+ /**
+ * Set the mode handler
+ * @param modeHandler
+ */
+ public IndexerIoModeHandler getModeHandler()
+ {
+ if (modeHandler == null)
+ {
+
+ if (cache.getStatus() != ComponentStatus.RUNNING)
+ {
+ throw new IllegalStateException("The cache should be started first");
+ }
+ synchronized (this)
+ {
+ if (modeHandler == null)
+ {
+ this.modeHandler =
+ new IndexerIoModeHandler(cacheManager.isCoordinator()
+ || cache.getConfiguration().getCacheMode() == CacheMode.LOCAL ? IndexerIoMode.READ_WRITE
+ : IndexerIoMode.READ_ONLY);
+ }
+ }
+ }
+ return modeHandler;
+ }
+
+ /**
+ * Indicates whether the current cache is the coordinator of the cluster. This implementation assumes that the
+ * coordinator is the first member in the list.
+ *
+ * @param newView View instance containing the new view of the cluster
+ * @return whether the current cache is the coordinator or not.
+ */
+ private boolean isCoordinator(List<Address> newView, Address currentAddress)
+ {
+ if (!currentAddress.equals(localAddress))
+ {
+ localAddress = currentAddress;
+ }
+ if (localAddress != null)
+ {
+ return !newView.isEmpty() && localAddress.equals(newView.get(0));
+ }
+ else
+ {
+ /* Invalid new view, so previous value returned */
+ return coordinator;
+ }
+ }
+
+ /**
+ * Method called when the cache either becomes the coordinator or stops being the coordinator. If it becomes the
+ * coordinator, it can optionally start the in-memory state transfer to the underlying cache store.
+ *
+ * @param newActiveState true if the cache just became the coordinator, false if the cache stopped being the
+ * coordinator.
+ */
+ protected void activeStatusChanged(final boolean newActiveState)
+ {
+ // originally came from EXOJCR-1345.
+ // Deadlock occurs inside JGroups, if calling some operations inside the same thread,
+ // invoking ViewChanged. That's why, need to perform operation in separated async tread.
+ new Thread(new Runnable()
+ {
+ public void run()
+ {
+ coordinator = newActiveState;
+
+ getModeHandler().setMode(coordinator ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY);
+ log.info("Set indexer io mode to:" + (coordinator ? IndexerIoMode.READ_WRITE : IndexerIoMode.READ_ONLY));
+
+ if (coordinator)
+ {
+ doPushState();
+ }
+ }
+ }, "JCR Indexer ActiveStatusChanged-handler").start();
+ }
+
+ /**
+ * Flushes all cache content to underlying CacheStore
+ */
+ protected void doPushState()
+ {
+ final boolean debugEnabled = log.isDebugEnabled();
+
+ if (debugEnabled)
+ {
+ log.debug("start pushing in-memory state to cache cacheLoader collection");
+ }
+
+ Map<String, ChangesFilterListsWrapper> changesMap = new HashMap<String, ChangesFilterListsWrapper>();
+ List<ChangesKey> processedItemKeys = new ArrayList<ChangesKey>();
+
+ DataContainer dc = cache.getAdvancedCache().getDataContainer();
+ Set keys = dc.keySet();
+ InternalCacheEntry entry;
+ // collect all cache entries into the following map:
+ // <WS ID> : <Concated lists of added/removed nodes>
+ for (Object k : keys)
+ {
+ if ((entry = dc.get(k)) != null)
+ {
+ if (entry.getValue() instanceof ChangesFilterListsWrapper && entry.getKey() instanceof ChangesKey)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.info("Received list wrapper, start indexing...");
+ }
+ // get stale List that was not processed
+ ChangesFilterListsWrapper staleListIncache = (ChangesFilterListsWrapper)entry.getValue();
+ ChangesKey key = (ChangesKey)entry.getKey();
+ // get newly created wrapper instance
+ ChangesFilterListsWrapper listToPush = changesMap.get(key.getWsId());
+ if (listToPush == null)
+ {
+ listToPush =
+ new ChangesFilterListsWrapper(new HashSet<String>(), new HashSet<String>(), new HashSet<String>(),
+ new HashSet<String>());
+ changesMap.put(key.getWsId(), listToPush);
+ }
+ // copying lists into the new wrapper
+ listToPush.getParentAddedNodes().addAll(staleListIncache.getParentAddedNodes());
+ listToPush.getParentRemovedNodes().addAll(staleListIncache.getParentRemovedNodes());
+
+ listToPush.getAddedNodes().addAll(staleListIncache.getAddedNodes());
+ listToPush.getRemovedNodes().addAll(staleListIncache.getRemovedNodes());
+ processedItemKeys.add(key);
+ }
+ }
+
+ }
+
+ // process all lists for each workspace
+ for (Entry<String, ChangesFilterListsWrapper> changesEntry : changesMap.entrySet())
+ {
+ // create key based on wsId and generated id
+ ChangesKey changesKey = new ChangesKey(changesEntry.getKey(), IdGenerator.generate());
+ cache.putAsync(changesKey, changesEntry.getValue());
+ }
+
+ for (ChangesKey key : processedItemKeys)
+ {
+ cache.removeAsync(key);
+ }
+
+ if (debugEnabled)
+ {
+ log.debug("in-memory state passed to cache cacheStore successfully");
+ }
+ }
+
+ @Listener
+ public class CacheListener
+ {
+ @CacheStarted
+ public void cacheStarted(Event e)
+ {
+ localAddress = cacheManager.getAddress();
+ coordinator = cacheManager.isCoordinator();
+ }
+
+ /**
+ * The cluster formation changed, so determine whether the current cache stopped being the coordinator or became
+ * the coordinator. This method can lead to an optional in memory to cache loader state push, if the current cache
+ * became the coordinator. This method will report any issues that could potentially arise from this push.
+ */
+ @ViewChanged
+ public void viewChange(ViewChangedEvent event)
+ {
+ boolean tmp = isCoordinator(event.getNewMembers(), event.getLocalAddress());
+
+ if (coordinator != tmp)
+ {
+ activeStatusChanged(tmp);
+ }
+ }
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexCacheStore.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexCacheStore.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexCacheStore.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+
+/**
+ * Implements Cache Store that designed to be used when each cluster node has it's own local index
+ *
+ * @author <a href="mailto:nikolazius at gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: LocalIndexerCacheStore.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class LocalIndexCacheStore extends AbstractIndexerCacheStore
+{
+
+ protected volatile IndexerIoModeHandler modeHandler;
+
+ public LocalIndexCacheStore()
+ {
+ super();
+ this.modeHandler = new IndexerIoModeHandler(IndexerIoMode.READ_WRITE); // initialize mode handler
+ }
+
+ @Override
+ public IndexerIoModeHandler getModeHandler()
+ {
+ return modeHandler;
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/LocalIndexChangesFilter.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,114 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.query.ispn;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.services.jcr.config.QueryHandlerEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper;
+import org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.impl.core.query.IndexingTree;
+import org.exoplatform.services.jcr.impl.core.query.LocalIndexMarker;
+import org.exoplatform.services.jcr.impl.core.query.QueryHandler;
+import org.exoplatform.services.jcr.impl.core.query.SearchManager;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
+import org.exoplatform.services.jcr.util.IdGenerator;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.infinispan.Cache;
+import org.infinispan.context.Flag;
+import org.infinispan.loaders.CacheLoaderManager;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * This type of ChangeFilter offers an ability for each cluster instance to have own
+ * local index (stack of indexes, from persistent to volatile). It uses ISPN cache for
+ * Lucene Documents and UUIDs delivery. Each node works in ReadWrite mode, so manages
+ * it own volatile, merger, local list of persisted indexes and stand-alone
+ * UpdateInProgressMonitor implementation.
+ * This implementation is similar to ISPNIndexChangesFilter but does not use
+ * ISPNIndexInfoss and ISPNIndexUpdateMonitor classes.
+ *
+ * @author <a href="mailto:anatoliy.bazko at gmail.com">Anatoliy Bazko</a>
+ * @version $Id: LocalIndexChangesFilter.java 34360 2009-07-22 23:58:59Z tolusha $
+ */
+public class LocalIndexChangesFilter extends IndexerChangesFilter implements LocalIndexMarker
+{
+ /**
+ * Logger instance for this class
+ */
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.LocalIndexChangesFilter");
+
+ public static final String PARAM_INFINISPAN_CACHESTORE_CLASS = "infinispan-cachestore-classname";
+
+ private final Cache<Serializable, Object> cache;
+
+ private final String wsId;
+
+ /**
+ * LocalIndexChangesFilter constructor.
+ */
+ public LocalIndexChangesFilter(SearchManager searchManager, SearchManager parentSearchManager,
+ QueryHandlerEntry config, IndexingTree indexingTree, IndexingTree parentIndexingTree, QueryHandler handler,
+ QueryHandler parentHandler, ConfigurationManager cfm) throws IOException, RepositoryException,
+ RepositoryConfigurationException
+ {
+ super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree, handler, parentHandler, cfm);
+
+ this.wsId = searchManager.getWsId();
+ ISPNCacheFactory<Serializable, Object> factory = new ISPNCacheFactory<Serializable, Object>(cfm);
+ config.putParameterValue(PARAM_INFINISPAN_CACHESTORE_CLASS, LocalIndexCacheStore.class.getName());
+ this.cache = factory.createCache("Indexer_" + searchManager.getWsId(), config);
+
+ CacheLoaderManager cacheLoaderManager =
+ cache.getAdvancedCache().getComponentRegistry().getComponent(CacheLoaderManager.class);
+ AbstractIndexerCacheStore cacheStore = (AbstractIndexerCacheStore)cacheLoaderManager.getCacheLoader();
+
+ cacheStore.register(searchManager, parentSearchManager, handler, parentHandler);
+ IndexerIoModeHandler modeHandler = cacheStore.getModeHandler();
+ handler.setIndexerIoModeHandler(modeHandler);
+ parentHandler.setIndexerIoModeHandler(modeHandler);
+
+ // using default updateMonitor and default
+ if (!parentHandler.isInitialized())
+ {
+ parentHandler.init();
+ }
+ if (!handler.isInitialized())
+ {
+ handler.init();
+ }
+ }
+
+ protected Log getLogger()
+ {
+ return log;
+ }
+
+ protected void doUpdateIndex(ChangesFilterListsWrapper changes)
+ {
+ ChangesKey changesKey = new ChangesKey(wsId, IdGenerator.generate());
+ cache.getAdvancedCache().withFlags(Flag.SKIP_LOCKING).put(changesKey, changes);
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,1248 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+import org.exoplatform.commons.utils.SecurityHelper;
+import org.exoplatform.services.jcr.datamodel.ItemData;
+import org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.infinispan.AdvancedCache;
+import org.infinispan.Cache;
+import org.infinispan.config.Configuration;
+import org.infinispan.config.Configuration.CacheMode;
+import org.infinispan.context.Flag;
+import org.infinispan.lifecycle.ComponentStatus;
+import org.infinispan.manager.EmbeddedCacheManager;
+import org.infinispan.util.concurrent.NotifyingFuture;
+import org.infinispan.util.concurrent.locks.LockManager;
+
+import java.security.PrivilegedAction;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+import javax.transaction.Status;
+import javax.transaction.TransactionManager;
+
+/**
+ * Decorator over the Infinispan Cache that stores changes in buffer, then sorts and applies it.
+ *
+ * @author <a href="mailto:Sergey.Kabashnyuk at exoplatform.org">Sergey Kabashnyuk</a>
+ * @version $Id: BufferedISPNCache.java 3514 2010-11-22 16:14:36Z nzamosenchuk $
+ *
+ */
+ at SuppressWarnings("unchecked")
+public class BufferedISPNCache implements Cache<CacheKey, Object>
+{
+ /**
+ * Parent cache.
+ */
+ private final AdvancedCache<CacheKey, Object> parentCache;
+
+ private final ThreadLocal<CompressedISPNChangesBuffer> changesList = new ThreadLocal<CompressedISPNChangesBuffer>();
+
+ private ThreadLocal<Boolean> local = new ThreadLocal<Boolean>();
+
+ /**
+ * Allow to perform local cache changes.
+ */
+ private final Boolean allowLocalChanges;
+
+ protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.BufferedISPNCache");
+
+ public static enum ChangesType {
+ REMOVE, PUT;
+ }
+
+ /**
+ * Container for changes
+ */
+ public static abstract class ChangesContainer implements Comparable<ChangesContainer>
+ {
+ protected final CacheKey key;
+
+ protected final ChangesType changesType;
+
+ protected final AdvancedCache<CacheKey, Object> cache;
+
+ protected final int historicalIndex;
+
+ protected final boolean localMode;
+
+ private final Boolean allowLocalChanges;
+
+ public ChangesContainer(CacheKey key, ChangesType changesType, AdvancedCache<CacheKey, Object> cache,
+ int historicalIndex, boolean localMode, Boolean allowLocalChanges)
+ {
+ this.key = key;
+ this.changesType = changesType;
+ this.cache = cache;
+ this.historicalIndex = historicalIndex;
+ this.localMode = localMode;
+ this.allowLocalChanges = allowLocalChanges;
+ }
+
+ /**
+ * @return the key
+ */
+ public CacheKey getKey()
+ {
+ return key;
+ }
+
+ /**
+ * @return the index of change in original sequence
+ */
+ public int getHistoricalIndex()
+ {
+ return historicalIndex;
+ }
+
+ /**
+ * @return the changesType
+ */
+ public ChangesType getChangesType()
+ {
+ return changesType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString()
+ {
+ return key.toString() + " type=" + changesType + " historysIndex=" + historicalIndex;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int compareTo(ChangesContainer o)
+ {
+ // We use the lock manager to sort the key in order to be able
+ // to use the lock stripping more details here https://issues.jboss.org/browse/ISPN-993
+ LockManager lm = cache.getLockManager();
+ int result = lm.getLockId(key) - lm.getLockId(o.getKey());
+ return result == 0 ? historicalIndex - o.getHistoricalIndex() : result;
+ }
+
+ protected AdvancedCache<CacheKey, Object> setCacheLocalMode()
+ {
+ if (localMode)
+ {
+ if (allowLocalChanges == null)
+ {
+ CacheMode cacheMode = cache.getConfiguration().getCacheMode();
+ if (cacheMode != CacheMode.DIST_ASYNC && cacheMode != CacheMode.DIST_SYNC)
+ {
+ return cache.withFlags(Flag.CACHE_MODE_LOCAL);
+ }
+ }
+ else if (allowLocalChanges)
+ {
+ return cache.withFlags(Flag.CACHE_MODE_LOCAL);
+ }
+ }
+ return cache;
+ }
+
+ public abstract void apply();
+
+ public boolean isTxRequired()
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Put object container;
+ */
+ public static class PutObjectContainer extends ChangesContainer
+ {
+ private final Object value;
+
+ public PutObjectContainer(CacheKey key, Object value, AdvancedCache<CacheKey, Object> cache,
+ int historicalIndex, boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.PUT, cache, historicalIndex, local, allowLocalChanges);
+
+ this.value = value;
+ }
+
+ @Override
+ public void apply()
+ {
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).put(key, value);
+ }
+ }
+
+
+ /**
+ * Put object if absent container
+ */
+ public static class PutObjectIfAbsentContainer extends ChangesContainer
+ {
+ private final Object value;
+
+ public PutObjectIfAbsentContainer(CacheKey key, Object value, AdvancedCache<CacheKey, Object> cache,
+ int historicalIndex, boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.PUT, cache, historicalIndex, local, allowLocalChanges);
+
+ this.value = value;
+ }
+
+ @Override
+ public void apply()
+ {
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).putIfAbsent(key, value);
+ }
+ }
+
+ /**
+ * It tries to get Set by given key. If it is Set then adds new value and puts new set back. If
+ * null found, then new Set created (ordinary cache does).
+ */
+ public static class AddToListContainer extends ChangesContainer
+ {
+ private final Object value;
+
+ private final boolean forceModify;
+
+ public AddToListContainer(CacheKey key, Object value, AdvancedCache<CacheKey, Object> cache,
+ boolean forceModify, int historicalIndex, boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.PUT, cache, historicalIndex, local, allowLocalChanges);
+ this.value = value;
+ this.forceModify = forceModify;
+ }
+
+ @Override
+ public void apply()
+ {
+ // force writeLock on next read
+ Object existingObject = cache.withFlags(Flag.FORCE_WRITE_LOCK).get(key);
+ Set<Object> newSet = new HashSet<Object>();
+
+ // if set found of null, perform add
+ if (existingObject instanceof Set || (existingObject == null && forceModify))
+ {
+ // set found
+ if (existingObject instanceof Set)
+ {
+ newSet.addAll((Set<Object>)existingObject);
+ }
+ newSet.add(value);
+
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).put(key, newSet);
+ }
+ else if (existingObject != null)
+ {
+ LOG.error("Unexpected object found by key " + key.toString() + ". Expected Set, but found:"
+ + existingObject.getClass().getName());
+ }
+ else if (!localMode && cache.getConfiguration().getCacheMode() != CacheMode.LOCAL
+ && cache.getCacheManager().getMembers().size() > 1)
+ {
+ // to prevent consistency issue since we don't have the list in the local cache, we are in cluster env
+ // and we are in a non local mode, we clear the list in order to enforce other cluster nodes to reload it from the db
+ cache.withFlags(Flag.SKIP_REMOTE_LOOKUP).remove(key);
+ return;
+ }
+ }
+
+ @Override
+ public boolean isTxRequired()
+ {
+ return true;
+ }
+ }
+
+ /**
+ * It tries to get Map{filter, Set{itemIds}} by given key. If Map exists then adds itemDatas ID to all acceptable pattern lists.
+ */
+ public static class AddToPatternListContainer extends ChangesContainer
+ {
+ private final ItemData itemData;
+
+ public AddToPatternListContainer(CacheKey key, ItemData value, AdvancedCache<CacheKey, Object> cache,
+ int historicalIndex, boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.PUT, cache, historicalIndex, local, allowLocalChanges);
+ this.itemData = value;
+ }
+
+ @Override
+ public void apply()
+ {
+ // force writeLock on next read
+ Object existingObject = cache.withFlags(Flag.FORCE_WRITE_LOCK).get(key);
+
+ // if Map found , perform add
+ if (existingObject instanceof Map)
+ {
+ Map<QPathEntryFilter, Set<String>> newMap =
+ new HashMap<QPathEntryFilter, Set<String>>((Map<QPathEntryFilter, Set<String>>)existingObject);
+
+ Iterator<QPathEntryFilter> iterator = newMap.keySet().iterator();
+ while (iterator.hasNext())
+ {
+ QPathEntryFilter pattern = iterator.next();
+ if (pattern.accept(itemData))
+ {
+ Set<String> newSet = newMap.get(pattern);
+ newSet.add(itemData.getIdentifier());
+ newMap.put(pattern, newSet);
+ }
+ }
+
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).put(key, newMap);
+ }
+ else if (existingObject != null)
+ {
+ LOG.error("Unexpected object found by key " + key.toString() + ". Expected Map, but found:"
+ + existingObject.getClass().getName());
+ }
+ else if (!localMode && cache.getConfiguration().getCacheMode() != CacheMode.LOCAL
+ && cache.getCacheManager().getMembers().size() > 1)
+ {
+ // to prevent consistency issue since we don't have the list in the local cache, we are in cluster env
+ // and we are in a non local mode, we remove all the patterns in order to enforce other cluster nodes to reload them from the db
+ cache.withFlags(Flag.SKIP_REMOTE_LOOKUP).remove(key);
+ }
+ }
+
+ @Override
+ public boolean isTxRequired()
+ {
+ return true;
+ }
+ }
+
+ /**
+ * It tries to get set by given key. If it is set then removes value and puts new modified set
+ * back.
+ */
+ public static class RemoveFromListContainer extends ChangesContainer
+ {
+ private final Object value;
+
+ public RemoveFromListContainer(CacheKey key, Object value, AdvancedCache<CacheKey, Object> cache,
+ int historicalIndex, boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.REMOVE, cache, historicalIndex, local, allowLocalChanges);
+ this.value = value;
+ }
+
+ @Override
+ public void apply()
+ {
+ // force writeLock on next read
+ Object existingObject = cache.withFlags(Flag.FORCE_WRITE_LOCK).get(key);
+
+ // if found value is really set! add to it.
+ if (existingObject instanceof Set)
+ {
+ Set<Object> newSet = new HashSet<Object>((Set<Object>)existingObject);
+ newSet.remove(value);
+
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).put(key, newSet);
+ }
+ }
+
+ @Override
+ public boolean isTxRequired()
+ {
+ return true;
+ }
+ }
+
+ /**
+ * It tries to get Map{filter, Set{itemIds}} by given key. IfMap exists then removes item IDs from all acceptable pattern lists.
+ */
+ public static class RemoveFromPatternListContainer extends ChangesContainer
+ {
+ private final ItemData itemData;
+
+ public RemoveFromPatternListContainer(CacheKey key, ItemData value, AdvancedCache<CacheKey, Object> cache,
+ int historicalIndex, boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.REMOVE, cache, historicalIndex, local, allowLocalChanges);
+ this.itemData = value;
+ }
+
+ @Override
+ public void apply()
+ {
+ // force writeLock on next read
+ Object existingObject = cache.withFlags(Flag.FORCE_WRITE_LOCK).get(key);
+
+ // if found value is really set! add to it.
+ if (existingObject instanceof Map)
+ {
+ Map<QPathEntryFilter, Set<String>> newMap =
+ new HashMap<QPathEntryFilter, Set<String>>((HashMap<QPathEntryFilter, Set<String>>)existingObject);
+
+ Iterator<QPathEntryFilter> patternInterator = newMap.keySet().iterator();
+ while (patternInterator.hasNext())
+ {
+ QPathEntryFilter pattern = patternInterator.next();
+ if (pattern.accept(itemData))
+ {
+ Set<String> newSet = new HashSet<String>(newMap.get(pattern));
+ newSet.remove(itemData.getIdentifier());
+ newMap.put(pattern, newSet);
+ }
+ }
+
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).put(key, newMap);
+ }
+ }
+
+ @Override
+ public boolean isTxRequired()
+ {
+ return true;
+ }
+ }
+
+ /**
+ * Remove container.
+ */
+ public static class RemoveObjectContainer extends ChangesContainer
+ {
+ public RemoveObjectContainer(CacheKey key, AdvancedCache<CacheKey, Object> cache, int historicalIndex,
+ boolean local, Boolean allowLocalChanges)
+ {
+ super(key, ChangesType.REMOVE, cache, historicalIndex, local, allowLocalChanges);
+ }
+
+ @Override
+ public void apply()
+ {
+ setCacheLocalMode().withFlags(Flag.SKIP_REMOTE_LOOKUP).remove(key);
+ }
+ }
+
+ public BufferedISPNCache(Cache<CacheKey, Object> parentCache, Boolean allowLocalChanges)
+ {
+ this.parentCache = parentCache.getAdvancedCache();
+ this.allowLocalChanges = allowLocalChanges;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Void> clearAsync()
+ {
+ return parentCache.clearAsync();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void compact()
+ {
+ parentCache.compact();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void endBatch(boolean successful)
+ {
+ parentCache.endBatch(successful);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Set<java.util.Map.Entry<CacheKey, Object>> entrySet()
+ {
+ return parentCache.entrySet();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void evict(CacheKey key)
+ {
+ parentCache.evict(key);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public AdvancedCache<CacheKey, Object> getAdvancedCache()
+ {
+ return parentCache.getAdvancedCache();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public EmbeddedCacheManager getCacheManager()
+ {
+ return parentCache.getCacheManager();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Configuration getConfiguration()
+ {
+ return parentCache.getConfiguration();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getName()
+ {
+ return parentCache.getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ComponentStatus getStatus()
+ {
+ return parentCache.getStatus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getVersion()
+ {
+ return parentCache.getVersion();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Set<CacheKey> keySet()
+ {
+ return parentCache.keySet();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object put(CacheKey key, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.put(key, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object put(CacheKey key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime,
+ TimeUnit maxIdleTimeUnit)
+ {
+ return parentCache.put(key, value, lifespan, lifespanUnit, maxIdleTime, maxIdleTimeUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void putAll(Map<? extends CacheKey, ? extends Object> map, long lifespan, TimeUnit unit)
+ {
+ parentCache.putAll(map, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void putAll(Map<? extends CacheKey, ? extends Object> map, long lifespan, TimeUnit lifespanUnit,
+ long maxIdleTime, TimeUnit maxIdleTimeUnit)
+ {
+ parentCache.putAll(map, lifespan, lifespanUnit, maxIdleTime, maxIdleTimeUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Void> putAllAsync(Map<? extends CacheKey, ? extends Object> data)
+ {
+ return parentCache.putAllAsync(data);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Void> putAllAsync(Map<? extends CacheKey, ? extends Object> data, long lifespan,
+ TimeUnit unit)
+ {
+ return parentCache.putAllAsync(data, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Void> putAllAsync(Map<? extends CacheKey, ? extends Object> data, long lifespan,
+ TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
+ {
+ return parentCache.putAllAsync(data, lifespan, lifespanUnit, maxIdle, maxIdleUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> putAsync(CacheKey key, Object value)
+ {
+ return parentCache.putAsync(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> putAsync(CacheKey key, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.putAsync(key, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> putAsync(CacheKey key, Object value, long lifespan, TimeUnit lifespanUnit,
+ long maxIdle, TimeUnit maxIdleUnit)
+ {
+ return parentCache.putAsync(key, value, lifespan, lifespanUnit, maxIdle, maxIdleUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void putForExternalRead(CacheKey key, Object value)
+ {
+ parentCache.putForExternalRead(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object putIfAbsent(CacheKey key, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.putIfAbsent(key, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object putIfAbsent(CacheKey key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime,
+ TimeUnit maxIdleTimeUnit)
+ {
+ return parentCache.putIfAbsent(key, value, lifespan, lifespanUnit, maxIdleTime, maxIdleTimeUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> putIfAbsentAsync(CacheKey key, Object value)
+ {
+ return parentCache.putIfAbsentAsync(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> putIfAbsentAsync(CacheKey key, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.putIfAbsentAsync(key, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> putIfAbsentAsync(CacheKey key, Object value, long lifespan,
+ TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
+ {
+ return parentCache.putIfAbsentAsync(key, value, lifespan, lifespanUnit, maxIdle, maxIdleUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> removeAsync(Object key)
+ {
+ return parentCache.removeAsync(key);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Boolean> removeAsync(Object key, Object value)
+ {
+ return parentCache.removeAsync(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object replace(CacheKey key, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.replace(key, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean replace(CacheKey key, Object oldValue, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.replace(key, oldValue, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object replace(CacheKey key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime,
+ TimeUnit maxIdleTimeUnit)
+ {
+ return parentCache.replace(key, value, lifespan, lifespanUnit, maxIdleTime, maxIdleTimeUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean replace(CacheKey key, Object oldValue, Object value, long lifespan, TimeUnit lifespanUnit,
+ long maxIdleTime, TimeUnit maxIdleTimeUnit)
+ {
+ return parentCache.replace(key, oldValue, value, lifespan, lifespanUnit, maxIdleTime, maxIdleTimeUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> replaceAsync(CacheKey key, Object value)
+ {
+ return parentCache.replaceAsync(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Boolean> replaceAsync(CacheKey key, Object oldValue, Object newValue)
+ {
+ return parentCache.replaceAsync(key, oldValue, newValue);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> replaceAsync(CacheKey key, Object value, long lifespan, TimeUnit unit)
+ {
+ return parentCache.replaceAsync(key, value, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Boolean> replaceAsync(CacheKey key, Object oldValue, Object newValue, long lifespan,
+ TimeUnit unit)
+ {
+ return parentCache.replaceAsync(key, oldValue, newValue, lifespan, unit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> replaceAsync(CacheKey key, Object value, long lifespan, TimeUnit lifespanUnit,
+ long maxIdle, TimeUnit maxIdleUnit)
+ {
+ return parentCache.replaceAsync(key, value, lifespan, lifespanUnit, maxIdle, maxIdleUnit);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Boolean> replaceAsync(CacheKey key, Object oldValue, Object newValue, long lifespan,
+ TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
+ {
+ return parentCache.replaceAsync(key, oldValue, newValue);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean startBatch()
+ {
+ return parentCache.startBatch();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<Object> values()
+ {
+ return parentCache.values();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object putIfAbsent(CacheKey key, Object value)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new PutObjectIfAbsentContainer(key, value, parentCache, changesContainer.getHistoryIndex(), local
+ .get(), allowLocalChanges));
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean remove(Object key, Object value)
+ {
+ return parentCache.remove(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object replace(CacheKey key, Object value)
+ {
+ return parentCache.replace(key, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean replace(CacheKey key, Object oldValue, Object newValue)
+ {
+ return parentCache.replace(key, oldValue, newValue);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clear()
+ {
+ parentCache.clear();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean containsKey(Object key)
+ {
+ return parentCache.containsKey(key);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean containsValue(Object value)
+ {
+ return parentCache.containsValue(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object get(Object key)
+ {
+ return parentCache.get(key);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEmpty()
+ {
+ return parentCache.isEmpty();
+ }
+
+ /**
+ * Put object in cache.
+ *
+ * @param key
+ * cache key
+ * @param value
+ * cache value
+ * @return
+ * always returns null
+ */
+ public Object put(CacheKey key, Object value)
+ {
+ return put(key, value, false);
+ }
+
+ /**
+ * Put object in cache.
+ * @param key
+ * cache key
+ * @param value
+ * cache value
+ * @param withReturnValue
+ * indicates if a return value is expected
+ * @return <code>null</code> if <code>withReturnValue</code> has been set to <code>false</code>
+ * the previous value otherwise
+ */
+ public Object put(final CacheKey key, Object value, final boolean withReturnValue)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new PutObjectContainer(key, value, parentCache, changesContainer.getHistoryIndex(), local
+ .get(), allowLocalChanges));
+
+ return withReturnValue ? parentCache.get(key) : null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void putAll(Map<? extends CacheKey, ? extends Object> m)
+ {
+ parentCache.putAll(m);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object remove(Object key)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new RemoveObjectContainer((CacheKey)key, parentCache, changesContainer.getHistoryIndex(),
+ local.get(), allowLocalChanges));
+
+ // return null as we never used result
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int size()
+ {
+ return parentCache.size();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void start()
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ parentCache.start();
+ return null;
+ }
+ };
+ SecurityHelper.doPrivilegedAction(action);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void stop()
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ parentCache.stop();
+ return null;
+ }
+ };
+ SecurityHelper.doPrivilegedAction(action);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addListener(Object listener)
+ {
+ parentCache.addListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Set<Object> getListeners()
+ {
+ return parentCache.getListeners();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeListener(Object listener)
+ {
+ parentCache.removeListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> getAsync(CacheKey key)
+ {
+ return parentCache.getAsync(key);
+ }
+
+ /**
+ * Start buffering process.
+ */
+ public void beginTransaction()
+ {
+ changesList.set(new CompressedISPNChangesBuffer());
+ local.set(false);
+ }
+
+ /**
+ *
+ * @return status of the cache transaction
+ */
+ public boolean isTransactionActive()
+ {
+ return changesList.get() != null;
+ }
+
+ /**
+ * Sort changes and commit data to the cache.
+ */
+ public void commitTransaction()
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ final TransactionManager tm = getTransactionManager();
+ try
+ {
+ final List<ChangesContainer> containers = changesContainer.getSortedList();
+ commitChanges(tm, containers);
+ }
+ finally
+ {
+ changesList.set(null);
+ changesContainer = null;
+ }
+ }
+
+ /**
+ * @param tm
+ * @param containers
+ */
+ private void commitChanges(TransactionManager tm, List<ChangesContainer> containers)
+ {
+ for (ChangesContainer cacheChange : containers)
+ {
+ boolean isTxCreated = false;
+ try
+ {
+ if (cacheChange.isTxRequired() && tm != null && tm.getStatus() == Status.STATUS_NO_TRANSACTION)
+ {
+ // No tx exists so we create a new tx
+ if (LOG.isTraceEnabled())
+ LOG.trace("No Tx is active we then create a new tx");
+ tm.begin();
+ isTxCreated = true;
+ }
+ }
+ catch (Exception e)
+ {
+ LOG.warn("Could not create a new tx", e);
+ }
+ try
+ {
+ cacheChange.apply();
+ }
+ catch (RuntimeException e)
+ {
+ if (isTxCreated)
+ {
+ try
+ {
+ if (LOG.isTraceEnabled())
+ LOG.trace("An error occurs the tx will be rollbacked");
+ tm.rollback();
+ }
+ catch (Exception e1)
+ {
+ LOG.warn("Could not rollback the tx", e1);
+ }
+ }
+ throw e;
+ }
+ if (isTxCreated)
+ {
+ try
+ {
+ if (LOG.isTraceEnabled())
+ LOG.trace("The tx will be committed");
+ tm.commit();
+ }
+ catch (Exception e)
+ {
+ LOG.warn("Could not commit the tx", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Forget about changes
+ */
+ public void rollbackTransaction()
+ {
+ changesList.set(null);
+ }
+
+ /**
+ * Creates all ChangesBuffers with given parameter
+ *
+ * @param local
+ */
+ public void setLocal(boolean local)
+ {
+ // start local transaction
+ if (local && changesList.get() == null)
+ {
+ beginTransaction();
+ }
+ if (!local && this.local.get())
+ {
+
+ }
+ this.local.set(local);
+ }
+
+ /**
+ * Tries to get buffer and if it is null throws an exception otherwise returns buffer.
+ *
+ * @return
+ */
+ private CompressedISPNChangesBuffer getChangesBufferSafe()
+ {
+ CompressedISPNChangesBuffer changesContainer = changesList.get();
+ if (changesContainer == null)
+ {
+ throw new IllegalStateException("changesContainer should not be empty");
+ }
+ return changesContainer;
+ }
+
+ public TransactionManager getTransactionManager()
+ {
+ return parentCache.getTransactionManager();
+ }
+
+ /**
+ *
+ * @param key
+ * @param value
+ */
+ public void addToList(CacheKey key, Object value, boolean forceModify)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new AddToListContainer(key, value, parentCache, forceModify, changesContainer
+ .getHistoryIndex(), local.get(), allowLocalChanges));
+ }
+
+ /**
+ *
+ * @param string
+ * @param node
+ * @return
+ */
+ public Object putInBuffer(CacheKey key, Object value)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+
+ // take Object from buffer for first
+ Object prevObject = getObjectFromChangesContainer(changesContainer, key);
+
+ changesContainer.add(new PutObjectContainer(key, value, parentCache, changesContainer.getHistoryIndex(), local
+ .get(), allowLocalChanges));
+
+ if (prevObject != null)
+ {
+ return prevObject;
+ }
+ else
+ {
+ return parentCache.get(key);
+ }
+ }
+
+ private Object getObjectFromChangesContainer(CompressedISPNChangesBuffer changesContainer, CacheKey key)
+ {
+ List<ChangesContainer> changes = changesContainer.getSortedList();
+ Object object = null;
+
+ for (ChangesContainer change : changes)
+ {
+ if (change.getChangesType().equals(ChangesType.PUT) && change.getKey().equals(key))
+ {
+ object = ((PutObjectContainer)change).value;
+ }
+ }
+
+ return object;
+ }
+
+ /**
+ *
+ * @param key
+ * @param value
+ */
+ public void removeFromList(CacheKey key, Object value)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new RemoveFromListContainer(key, value, parentCache, changesContainer.getHistoryIndex(),
+ local.get(), allowLocalChanges));
+ }
+
+ public void removeFromPatternList(CacheKey key, ItemData value)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new RemoveFromPatternListContainer(key, value, parentCache, changesContainer
+ .getHistoryIndex(), local.get(), allowLocalChanges));
+ }
+
+ public void addToPatternList(CacheKey key, ItemData value)
+ {
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+ changesContainer.add(new AddToPatternListContainer(key, value, parentCache, changesContainer.getHistoryIndex(),
+ local.get(), allowLocalChanges));
+ }
+
+ public Object getFromBuffer(CacheKey key)
+ {
+ //look at buffer for first
+ CompressedISPNChangesBuffer changesContainer = getChangesBufferSafe();
+
+ Object objectFromBuffer = getObjectFromChangesContainer(changesContainer, key);
+
+ if (objectFromBuffer != null)
+ {
+ return objectFromBuffer;
+ }
+ else
+ {
+ return parentCache.get(key);
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+
+/**
+ *
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: CacheId.java 2845 2010-07-30 13:29:37Z tolusha $
+ */
+public class CacheId extends CacheKey
+{
+
+ public CacheId()
+ {
+ super();
+ }
+
+ CacheId(String id)
+ {
+ super(id);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CacheId)
+ {
+ CacheId cacheId = (CacheId)obj;
+ return (cacheId.hash == hash && cacheId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheKey.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,153 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+import org.exoplatform.services.jcr.impl.Constants;
+import org.infinispan.distribution.group.Group;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * Created by The eXo Platform SAS. <br/>
+ * Base class for WorkspaceCache keys.<br/>
+ *
+ * Date: 10.06.2008<br/>
+ *
+ * @author <a href="mailto:anatoliy.bazko at exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id: CacheKey.java 2845 2010-07-30 13:29:37Z tolusha $
+ */
+public abstract class CacheKey implements Externalizable, Comparable<CacheKey>
+{
+
+ protected String id;
+
+ protected int hash;
+
+ /**
+ * The value used in case, the grouping is enabled
+ */
+ protected String group;
+
+ public CacheKey()
+ {
+ }
+
+ public CacheKey(String id)
+ {
+ this(id, null);
+ }
+
+ public CacheKey(String id, String group)
+ {
+ this.id = id;
+ this.hash = id.hashCode();
+ this.group = group;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode()
+ {
+ return this.hash;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString()
+ {
+ return this.getClass().getSimpleName() + "-" + this.id + "-" + this.group;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int compareTo(CacheKey o)
+ {
+ int result = getClass().getName().compareTo(o.getClass().getName());
+ return result == 0 ? id.compareTo(o.id) : result;
+ }
+
+ /**
+ * This method is used for the grouping when its enabled. It will return
+ * the value of the group if it has been explicitly set otherwise it will
+ * return the value of the fullId
+ * @return the group
+ */
+ @Group
+ public String getGroup()
+ {
+ return group == null ? id : group;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ byte[] buf;
+ if (group == null)
+ {
+ out.writeInt(-1);
+ }
+ else
+ {
+ buf = group.getBytes(Constants.DEFAULT_ENCODING);
+ out.writeInt(buf.length);
+ out.write(buf);
+ }
+
+ buf = id.getBytes(Constants.DEFAULT_ENCODING);
+ out.writeInt(buf.length);
+ out.write(buf);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ byte[] buf;
+ int length = in.readInt();
+ if (length >= 0)
+ {
+ buf = new byte[length];
+ in.readFully(buf);
+ group = new String(buf, Constants.DEFAULT_ENCODING);
+ }
+
+ buf = new byte[in.readInt()];
+ in.readFully(buf);
+ id = new String(buf, Constants.DEFAULT_ENCODING);
+ hash = id.hashCode();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public abstract boolean equals(Object obj);
+}
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ * @author <a href="abazko at exoplatform.com">Anatoliy Bazko</a>
+ * @version $Id: CachePagedNodes.java 34360 2009-07-22 23:58:59Z tolusha $
+ */
+public class CacheNodesByPageId extends CacheKey
+{
+
+ public CacheNodesByPageId()
+ {
+ super();
+ }
+
+ CacheNodesByPageId(String id)
+ {
+ super(id);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CacheNodesByPageId)
+ {
+ CacheNodesByPageId cacheNodesByPageId = (CacheNodesByPageId)obj;
+ return (cacheNodesByPageId.hash == hash && cacheNodesByPageId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ * Created by The eXo Platform SAS
+ *
+ * Date: 10.06.2008
+ *
+ * Cache record used to store item Id key.
+ *
+ * @author <a href="mailto:peter.nedonosko at exoplatform.com.ua">Peter Nedonosko</a>
+ * @version $Id: CacheNodesId.java 2845 2010-07-30 13:29:37Z tolusha $
+ */
+public class CacheNodesId extends CacheKey
+{
+
+ public CacheNodesId()
+ {
+ super();
+ }
+
+ CacheNodesId(String id)
+ {
+ super(id);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CacheNodesId)
+ {
+ CacheNodesId cacheNodesId = (CacheNodesId)obj;
+ return (cacheNodesId.hash == hash && cacheNodesId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2003-2011 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy at gmail.com">Karpenko Sergiy</a>
+ * @version $Id: CachePatternNodesId.java 111 10.05.2011 serg $
+ */
+public class CachePatternNodesId extends CacheKey
+{
+
+ public CachePatternNodesId()
+ {
+ super();
+ }
+
+ CachePatternNodesId(String id)
+ {
+ super(id);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CachePatternNodesId)
+ {
+ CachePatternNodesId cacheNodesId = (CachePatternNodesId)obj;
+ return (cacheNodesId.hash == hash && cacheNodesId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2003-2011 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy at gmail.com">Karpenko Sergiy</a>
+ * @version $Id: CachePatternPropsId.java 111 28 êâ³ò. 2011 serg $
+ */
+public class CachePatternPropsId extends CacheKey
+{
+
+ public CachePatternPropsId()
+ {
+ super();
+ }
+
+ CachePatternPropsId(String parentId)
+ {
+ super(parentId);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CachePatternPropsId)
+ {
+ CachePatternPropsId cachePatternPropsId = (CachePatternPropsId)obj;
+ return (cachePatternPropsId.hash == hash && cachePatternPropsId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ * Created by The eXo Platform SAS
+ *
+ * Date: 10.06.2008
+ *
+ * Cache record used to store item Id key.
+ *
+ * @author <a href="mailto:peter.nedonosko at exoplatform.com.ua">Peter Nedonosko</a>
+ * @version $Id: CachePropsId.java 2845 2010-07-30 13:29:37Z tolusha $
+ */
+public class CachePropsId extends CacheKey
+{
+
+ public CachePropsId()
+ {
+ super();
+ }
+
+ CachePropsId(String id)
+ {
+ super(id);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CachePropsId)
+ {
+ CachePropsId cachePropsId = (CachePropsId)obj;
+ return (cachePropsId.hash == hash && cachePropsId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+import org.exoplatform.services.jcr.datamodel.ItemType;
+import org.exoplatform.services.jcr.datamodel.QPath;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
+import org.exoplatform.services.jcr.impl.Constants;
+
+/**
+ * Created by The eXo Platform SAS. <br/>
+ *
+ * Store QPath as key in cache.
+ *
+ * 15.06.07
+ *
+ * @author <a href="mailto:peter.nedonosko at exoplatform.com.ua">Peter Nedonosko</a>
+ * @version $Id: CacheQPath.java 3393 2010-11-04 07:54:54Z tolusha $
+ */
+class CacheQPath extends CacheKey
+{
+ public CacheQPath()
+ {
+ super();
+ }
+
+ CacheQPath(String parentId, QPath path, ItemType itemType)
+ {
+ this(parentId, path.getEntries()[path.getEntries().length - 1], itemType);
+ }
+
+ CacheQPath(String parentId, QPathEntry name, ItemType itemType)
+ {
+ super(new StringBuilder().append(parentId != null ? parentId : Constants.ROOT_PARENT_UUID)
+ .append(name.getAsString(true)).append(itemType.toString()).toString(), parentId);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CacheQPath)
+ {
+ CacheQPath cacheQPath = (CacheQPath)obj;
+ return (cacheQPath.hash == hash && cacheQPath.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ * Created by The eXo Platform SAS
+ *
+ * Date: 10.06.2008
+ *
+ * Cache record used to store item Id key.
+ *
+ * @author <a href="mailto:peter.nedonosko at exoplatform.com.ua">Peter Nedonosko</a>
+ * @version $Id: CachePropsId.java 2845 2010-07-30 13:29:37Z tolusha $
+ */
+public class CacheRefsId extends CacheKey
+{
+ public CacheRefsId()
+ {
+ super();
+ }
+
+ CacheRefsId(String id)
+ {
+ super(id);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof CacheRefsId)
+ {
+ CacheRefsId cachePropsId = (CacheRefsId)obj;
+ return (cachePropsId.hash == hash && cachePropsId.id.equals(id));
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CompressedISPNChangesBuffer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CompressedISPNChangesBuffer.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CompressedISPNChangesBuffer.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.BufferedISPNCache.ChangesContainer;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Sorting cache modification
+ *
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: CompressedISPNChangesBuffer.java 2845 2010-07-30 13:29:37Z tolusha $
+ */
+public class CompressedISPNChangesBuffer
+{
+ private int historyIndex = 0;
+
+ List<ChangesContainer> changes = new ArrayList<ChangesContainer>();
+
+ /**
+ * Adds new modification container to buffer and performs optimization if needed. Optimization doesn't iterate
+ * over lists and uses HashMaps. So each optimization duration doesn't depend on list size.
+ *
+ * @param container
+ */
+ public void add(ChangesContainer container)
+ {
+ changes.add(container);
+ }
+
+ /**
+ * After each invocation of the method increments internal field.
+ * Designed to be used as history order index in each {@link ChangesContainer}
+ * @return
+ */
+ public int getHistoryIndex()
+ {
+ historyIndex++;
+ return historyIndex;
+ }
+
+ /**
+ * Builds single list of modifications from internal structures and sorts it.
+ *
+ * @return
+ */
+ public List<ChangesContainer> getSortedList()
+ {
+ List<ChangesContainer> changesContainers = new ArrayList<ChangesContainer>(changes);
+ Collections.sort(changesContainers);
+ return changesContainers;
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,1647 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.services.jcr.access.AccessControlList;
+import org.exoplatform.services.jcr.config.CacheEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.dataflow.ItemState;
+import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
+import org.exoplatform.services.jcr.dataflow.persistent.WorkspaceStorageCache;
+import org.exoplatform.services.jcr.dataflow.persistent.WorkspaceStorageCacheListener;
+import org.exoplatform.services.jcr.datamodel.IllegalPathException;
+import org.exoplatform.services.jcr.datamodel.InternalQName;
+import org.exoplatform.services.jcr.datamodel.ItemData;
+import org.exoplatform.services.jcr.datamodel.ItemType;
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.datamodel.NullItemData;
+import org.exoplatform.services.jcr.datamodel.NullNodeData;
+import org.exoplatform.services.jcr.datamodel.NullPropertyData;
+import org.exoplatform.services.jcr.datamodel.PropertyData;
+import org.exoplatform.services.jcr.datamodel.QPath;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
+import org.exoplatform.services.jcr.datamodel.ValueData;
+import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.backup.BackupException;
+import org.exoplatform.services.jcr.impl.backup.Backupable;
+import org.exoplatform.services.jcr.impl.backup.DataRestore;
+import org.exoplatform.services.jcr.impl.backup.rdbms.DataRestoreContext;
+import org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter;
+import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
+import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.transaction.ActionNonTxAware;
+import org.infinispan.Cache;
+import org.infinispan.lifecycle.ComponentStatus;
+import org.infinispan.notifications.Listener;
+import org.infinispan.notifications.cachelistener.annotation.CacheEntryModified;
+import org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.transaction.TransactionManager;
+
+/**
+ * Created by The eXo Platform SAS.<p/>
+ *
+ * Cache based on Infinispan.<p/>
+ *
+ * <ul>
+ * <li>cache transparent: or item cached or not, we should not generate "not found" Exceptions </li>
+ *
+ * This cache implementation stores items by UUID and parent UUID with QPathEntry.
+ * Except this cache stores list of children UUID.
+ *
+ * <p/>
+ * Current state notes (subject of change):
+ * <ul>
+ * <li>cache implements WorkspaceStorageCache, without any stuff about references and locks</li>
+ * <li>transaction style implemented via batches, do with JTA (i.e. via exo's TransactionService + JBoss TM)</li>
+ * </ul>
+ *
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: ISPNCacheWorkspaceStorageCache.java 3514 2010-11-22 16:14:36Z nzamosenchuk $
+ */
+public class ISPNCacheWorkspaceStorageCache implements WorkspaceStorageCache, Backupable
+{
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.ISPNCacheWorkspaceStorageCache");
+
+ private final boolean enabled;
+
+ protected final BufferedISPNCache cache;
+
+ /**
+ * The list of all the listeners
+ */
+ private final List<WorkspaceStorageCacheListener> listeners = new CopyOnWriteArrayList<WorkspaceStorageCacheListener>();
+
+ private final CacheActionNonTxAware<Void, Void> commitTransaction = new CacheActionNonTxAware<Void, Void>()
+ {
+ @Override
+ protected Void execute(Void arg) throws RuntimeException
+ {
+ cache.commitTransaction();
+ return null;
+ }
+ };
+
+ private final CacheActionNonTxAware<ItemData, String> getFromCacheById =
+ new CacheActionNonTxAware<ItemData, String>()
+ {
+ @Override
+ protected ItemData execute(String id) throws RuntimeException
+ {
+ return id == null ? null : (ItemData)cache.get(new CacheId(id));
+ }
+ };
+
+ private final CacheActionNonTxAware<List<NodeData>, NodeData> getChildNodes =
+ new CacheActionNonTxAware<List<NodeData>, NodeData>()
+ {
+ @Override
+ protected List<NodeData> execute(NodeData parent) throws RuntimeException
+ {
+ // get list of children uuids
+ final Set<String> set = (Set<String>)cache.get(new CacheNodesId(parent.getIdentifier()));
+
+ if (set != null)
+ {
+ final List<NodeData> childs = new ArrayList<NodeData>();
+
+ for (String childId : set)
+ {
+ NodeData child = (NodeData)cache.get(new CacheId(childId));
+ if (child == null)
+ {
+ return null;
+ }
+
+ childs.add(child);
+ }
+
+ // order children by orderNumber, as HashSet returns children in other order
+ Collections.sort(childs, new NodesOrderComparator<NodeData>());
+ return childs;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ };
+
+ private final CacheActionNonTxAware<ItemData, Object> getFromCacheByPath =
+ new CacheActionNonTxAware<ItemData, Object>()
+ {
+ @Override
+ protected ItemData execute(Object... args) throws RuntimeException
+ {
+ String parentIdentifier = (String)args[0];
+ QPathEntry name = (QPathEntry)args[1];
+ ItemType itemType = (ItemType)args[2];
+ String itemId = null;
+
+ if (itemType == ItemType.UNKNOWN)
+ {
+ // Try as node first.
+ itemId = (String)cache.get(new CacheQPath(parentIdentifier, name, ItemType.NODE));
+
+ if (itemId == null || itemId.equals(NullItemData.NULL_ID))
+ {
+ // node with such a name is not found or marked as not-exist, so check the properties
+ String propId = (String)cache.get(new CacheQPath(parentIdentifier, name, ItemType.PROPERTY));
+ if (propId != null)
+ {
+ itemId = propId;
+ }
+ }
+ }
+ else if (itemType == ItemType.NODE)
+ {
+ itemId = (String)cache.get(new CacheQPath(parentIdentifier, name, ItemType.NODE));;
+ }
+ else
+ {
+ itemId = (String)cache.get(new CacheQPath(parentIdentifier, name, ItemType.PROPERTY));;
+ }
+
+ if (itemId != null)
+ {
+ if (itemId.equals(NullItemData.NULL_ID))
+ {
+ if (itemType == ItemType.UNKNOWN || itemType == ItemType.NODE)
+ {
+ return new NullNodeData();
+ }
+ else
+ {
+ return new NullPropertyData();
+ }
+ }
+ else
+ {
+ return get(itemId);
+ }
+ }
+ return null;
+ }
+ };
+
+ private final CacheActionNonTxAware<Integer, NodeData> getChildNodesCount =
+ new CacheActionNonTxAware<Integer, NodeData>()
+ {
+ @Override
+ protected Integer execute(NodeData parent) throws RuntimeException
+ {
+ Set<String> list = (Set<String>)cache.get(new CacheNodesId(parent.getIdentifier()));
+ return list != null ? list.size() : -1;
+ }
+ };
+
+ private final CacheActionNonTxAware<List<PropertyData>, Object> getChildProps =
+ new CacheActionNonTxAware<List<PropertyData>, Object>()
+ {
+ @Override
+ protected List<PropertyData> execute(Object... args) throws RuntimeException
+ {
+ String parentId = (String)args[0];
+ boolean withValue = (Boolean)args[1];
+ // get list of children uuids
+ final Set<String> set = (Set<String>)cache.get(new CachePropsId(parentId));
+ if (set != null)
+ {
+ final List<PropertyData> childs = new ArrayList<PropertyData>();
+
+ for (String childId : set)
+ {
+ PropertyData child = (PropertyData)cache.get(new CacheId(childId));
+
+ if (child == null)
+ {
+ return null;
+ }
+ if (withValue && child.getValues().size() <= 0)
+ {
+ return null;
+ }
+ childs.add(child);
+ }
+ return childs;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ };
+
+ private final CacheActionNonTxAware<List<PropertyData>, String> getReferencedProperties =
+ new CacheActionNonTxAware<List<PropertyData>, String>()
+ {
+ @Override
+ protected List<PropertyData> execute(String identifier) throws RuntimeException
+ {
+ // get list of children uuids
+ final Set<String> set = (Set<String>)cache.get(new CacheRefsId(identifier));
+ if (set != null)
+ {
+ final List<PropertyData> props = new ArrayList<PropertyData>();
+
+ for (String childId : set)
+ {
+ PropertyData prop = (PropertyData)cache.get(new CacheId(childId));
+
+ if (prop == null || prop instanceof NullItemData)
+ {
+ return null;
+ }
+ // add property as many times as has referenced values
+ List<ValueData> lData = prop.getValues();
+ for (int i = 0, length = lData.size(); i < length; i++)
+ {
+ ValueData vdata = lData.get(i);
+ try
+ {
+ if (new String(vdata.getAsByteArray(), Constants.DEFAULT_ENCODING).equals(identifier))
+ {
+ props.add(prop);
+ }
+ }
+ catch (IllegalStateException e)
+ {
+ // property was not added, force read from lower layer
+ return null;
+ }
+ catch (IOException e)
+ {
+ // property was not added, force read from lower layer
+ return null;
+ }
+ }
+ }
+ return props;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ };
+
+ private final CacheActionNonTxAware<Long, Void> getSize = new CacheActionNonTxAware<Long, Void>()
+ {
+ @Override
+ protected Long execute(Void arg) throws RuntimeException
+ {
+ return (long)cache.size();
+ }
+ };
+
+ /**
+ * Node order comparator for getChildNodes().
+ */
+ class NodesOrderComparator<N extends NodeData> implements Comparator<NodeData>
+ {
+ /**
+ * {@inheritDoc}
+ */
+ public int compare(NodeData n1, NodeData n2)
+ {
+ return n1.getOrderNumber() - n2.getOrderNumber();
+ }
+ }
+
+ class ChildItemsIterator<T extends ItemData> implements Iterator<T>
+ {
+
+ final Iterator<String> childs;
+
+ T next;
+
+ ChildItemsIterator(CacheKey key)
+ {
+ Set<String> set = (Set<String>)cache.get(key);
+ if (set != null)
+ {
+ childs = ((Set<String>)cache.get(key)).iterator();
+ fetchNext();
+ }
+ else
+ {
+ childs = null;
+ next = null;
+ }
+ }
+
+ protected void fetchNext()
+ {
+ if (childs.hasNext())
+ {
+ // traverse to the first existing or the end of children
+ T n = null;
+ do
+ {
+ n = (T)cache.get(new CacheId(childs.next()));
+ }
+ while (n == null && childs.hasNext());
+ next = n;
+ }
+ else
+ {
+ next = null;
+ }
+ }
+
+ public boolean hasNext()
+ {
+ return next != null;
+ }
+
+ public T next()
+ {
+ if (next == null)
+ {
+ throw new NoSuchElementException();
+ }
+
+ final T current = next;
+ fetchNext();
+ return current;
+ }
+
+ public void remove()
+ {
+ throw new IllegalArgumentException("Not implemented");
+ }
+ }
+
+ class ChildNodesIterator<N extends NodeData> extends ChildItemsIterator<N>
+ {
+ ChildNodesIterator(String parentId)
+ {
+ super(new CacheNodesId(parentId));
+ }
+
+ @Override
+ public N next()
+ {
+ return super.next();
+ }
+ }
+
+ class ChildPropertiesIterator<P extends PropertyData> extends ChildItemsIterator<P>
+ {
+
+ ChildPropertiesIterator(String parentId)
+ {
+ super(new CachePropsId(parentId));
+ }
+
+ @Override
+ public P next()
+ {
+ return super.next();
+ }
+ }
+
+ /**
+ * Cache constructor with eXo TransactionService support.
+ *
+ * @param wsConfig WorkspaceEntry workspace config
+ * @throws RepositoryException if error of initialization
+ * @throws RepositoryConfigurationException if error of configuration
+ */
+ public ISPNCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, ConfigurationManager cfm) throws RepositoryException,
+ RepositoryConfigurationException
+ {
+ if (wsConfig.getCache() == null)
+ {
+ throw new RepositoryConfigurationException("Cache configuration not found");
+ }
+ this.enabled = wsConfig.getCache().isEnabled();
+
+ // create cache using custom factory
+ ISPNCacheFactory<CacheKey, Object> factory = new ISPNCacheFactory<CacheKey, Object>(cfm);
+
+ // create parent Infinispan instance
+ CacheEntry cacheEntry = wsConfig.getCache();
+ Cache<CacheKey, Object> parentCache = factory.createCache("Data_" + wsConfig.getUniqueName(), cacheEntry);
+
+ Boolean allowLocalChanges = null;
+ try
+ {
+ allowLocalChanges = cacheEntry.getParameterBoolean("allow-local-changes");
+ }
+ catch (RepositoryConfigurationException e)
+ {
+ // do n't nothing
+ }
+ this.cache = new BufferedISPNCache(parentCache, allowLocalChanges);
+ cache.addListener(new CacheEventListener());
+ }
+
+ /**
+ * Return TransactionManager used by ISPN backing the JCR cache.
+ *
+ * @return TransactionManager
+ */
+ public TransactionManager getTransactionManager()
+ {
+ return cache.getTransactionManager();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void put(ItemData item)
+ {
+ // There is different commit processing for NullNodeData and ordinary ItemData.
+ if (item instanceof NullItemData)
+ {
+ putNullItem((NullItemData)item);
+ return;
+ }
+
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+ cache.setLocal(true);
+ if (item.isNode())
+ {
+ putNode((NodeData)item, ModifyChildOption.NOT_MODIFY);
+ }
+ else
+ {
+ putProperty((PropertyData)item, ModifyChildOption.NOT_MODIFY);
+ }
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void remove(ItemData item)
+ {
+ removeItem(item);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onSaveItems(final ItemStateChangesLog itemStates)
+ {
+ // if something happen we will rollback changes
+ boolean rollback = true;
+ try
+ {
+ cache.beginTransaction();
+ for (ItemState state : itemStates.getAllStates())
+ {
+ if (state.isAdded())
+ {
+ if (state.isPersisted())
+ {
+ putItem(state.getData());
+ }
+ }
+ else if (state.isUpdated())
+ {
+ if (state.isPersisted())
+ {
+ // There was a problem with removing a list of samename siblings in on transaction,
+ // so putItemInBufferedCache(..) and updateInBufferedCache(..) used instead put(..) and update (..) methods.
+ ItemData prevItem = putItemInBufferedCache(state.getData());
+ if (prevItem != null && state.isNode())
+ {
+ // nodes reordered, if previous is null it's InvalidItemState case
+ updateInBuffer((NodeData)state.getData(), (NodeData)prevItem);
+ }
+ }
+ }
+ else if (state.isDeleted())
+ {
+ removeItem(state.getData());
+ }
+ else if (state.isRenamed())
+ {
+ putItem(state.getData());
+ }
+ else if (state.isPathChanged())
+ {
+ updateTreePath(state.getOldPath(), state.getData().getQPath(), null);
+ }
+ else if (state.isMixinChanged())
+ {
+ if (state.isPersisted())
+ {
+ // update subtree ACLs
+ updateMixin((NodeData)state.getData());
+ }
+ }
+ }
+
+ cache.commitTransaction();
+ rollback = false;
+ }
+ finally
+ {
+ if (rollback)
+ {
+ cache.rollbackTransaction();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChildNodesByPage(NodeData parent, List<NodeData> childs, int fromOrderNum)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+
+ cache.setLocal(true);
+
+ CacheNodesByPageId cacheId = new CacheNodesByPageId(parent.getIdentifier());
+ Map<Integer, Set<String>> pages = (Map<Integer, Set<String>>)cache.get(cacheId);
+ if (pages == null)
+ {
+ pages = new HashMap<Integer, Set<String>>();
+ }
+
+ if (childs.size() > 0)
+ {
+ Set<String> set = new HashSet<String>();
+ for (NodeData child : childs)
+ {
+ putNode(child, ModifyChildOption.NOT_MODIFY);
+ set.add(child.getIdentifier());
+ }
+
+ pages.put(fromOrderNum, set);
+ cache.put(cacheId, pages);
+ }
+ else
+ {
+ // cache fact of empty childs list
+ pages.put(fromOrderNum, new HashSet<String>());
+ cache.put(cacheId, pages);
+ }
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChildNodes(NodeData parent, List<NodeData> childs)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+
+ cache.setLocal(true);
+ if (childs.size() > 0)
+ {
+ Set<Object> set = new HashSet<Object>();
+ for (NodeData child : childs)
+ {
+ putNode(child, ModifyChildOption.NOT_MODIFY);
+ set.add(child.getIdentifier());
+ }
+ cache.putIfAbsent(new CacheNodesId(parent.getIdentifier()), set);
+ }
+ else
+ {
+ // cache fact of empty childs list
+ cache.putIfAbsent(new CacheNodesId(parent.getIdentifier()), new HashSet<Object>());
+ }
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChildNodes(NodeData parent, QPathEntryFilter pattern, List<NodeData> childs)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+
+ cache.setLocal(true);
+ Set<String> set = new HashSet<String>();
+
+ for (NodeData child : childs)
+ {
+ putNode(child, ModifyChildOption.NOT_MODIFY);
+ set.add(child.getIdentifier());
+ }
+
+ CachePatternNodesId cacheId = new CachePatternNodesId(parent.getIdentifier());
+ Map<QPathEntryFilter, Set<String>> patterns = (Map<QPathEntryFilter, Set<String>>)cache.get(cacheId);
+ if (patterns == null)
+ {
+ patterns = new HashMap<QPathEntryFilter, Set<String>>();
+ }
+ patterns.put(pattern, set);
+ cache.put(cacheId, patterns);
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChildProperties(NodeData parent, List<PropertyData> childs)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+ cache.setLocal(true);
+ if (childs.size() > 0)
+ {
+ // add all new
+ Set<Object> set = new HashSet<Object>();
+ for (PropertyData child : childs)
+ {
+ putProperty(child, ModifyChildOption.NOT_MODIFY);
+ set.add(child.getIdentifier());
+ }
+ cache.putIfAbsent(new CachePropsId(parent.getIdentifier()), set);
+
+ }
+ else
+ {
+ LOG.warn("Empty properties list cached " + (parent != null ? parent.getQPath().getAsString() : parent));
+ }
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChildProperties(NodeData parent, QPathEntryFilter pattern, List<PropertyData> childs)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+ cache.setLocal(true);
+ if (childs.size() > 0)
+ {
+ // add all new
+ Set<String> set = new HashSet<String>();
+ for (PropertyData child : childs)
+ {
+ putProperty(child, ModifyChildOption.NOT_MODIFY);
+ set.add(child.getIdentifier());
+ }
+
+ CachePatternPropsId cacheId = new CachePatternPropsId(parent.getIdentifier());
+ Map<QPathEntryFilter, Set<String>> patterns = (Map<QPathEntryFilter, Set<String>>)cache.get(cacheId);
+ if (patterns == null)
+ {
+ patterns = new HashMap<QPathEntryFilter, Set<String>>();
+ }
+ patterns.put(pattern, set);
+ cache.put(cacheId, patterns);
+ }
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChildPropertiesList(NodeData parent, List<PropertyData> childProperties)
+ {
+ // TODO not implemented, will force read from DB
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ItemData get(String parentId, QPathEntry name)
+ {
+ return get(parentId, name, ItemType.UNKNOWN);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ItemData get(String parentIdentifier, QPathEntry name, ItemType itemType)
+ {
+ return getFromCacheByPath.run(parentIdentifier, name, itemType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ItemData get(String id)
+ {
+ return getFromCacheById.run(id);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<NodeData> getChildNodes(final NodeData parent)
+ {
+ return getChildNodes.run(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<NodeData> getChildNodesByPage(final NodeData parent, final int fromOrderNum)
+ {
+ // get list of children uuids
+ final Map<Integer, Set<String>> pages =
+ (Map<Integer, Set<String>>)cache.get(new CacheNodesByPageId(parent.getIdentifier()));
+
+ if (pages == null)
+ {
+ return null;
+ }
+
+ Set<String> set = pages.get(fromOrderNum);
+ if (set == null)
+ {
+ return null;
+ }
+
+ final List<NodeData> childs = new ArrayList<NodeData>();
+ for (String childId : set)
+ {
+ NodeData child = (NodeData)cache.get(new CacheId(childId));
+ if (child == null)
+ {
+ return null;
+ }
+
+ childs.add(child);
+ }
+
+ // order children by orderNumber, as HashSet returns children in other order
+ Collections.sort(childs, new NodesOrderComparator<NodeData>());
+ return childs;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<NodeData> getChildNodes(final NodeData parent, final QPathEntryFilter pattern)
+ {
+ // get list of children uuids
+ final Map<QPathEntryFilter, Set<String>> patterns =
+ (Map<QPathEntryFilter, Set<String>>)cache.get(new CachePatternNodesId(parent.getIdentifier()));
+
+ if (patterns == null)
+ {
+ return null;
+ }
+
+ Set<String> set = patterns.get(pattern);
+ if (set == null)
+ {
+ return null;
+ }
+
+ final List<NodeData> childs = new ArrayList<NodeData>();
+
+ for (String childId : set)
+ {
+ NodeData child = (NodeData)cache.get(new CacheId(childId));
+ if (child == null)
+ {
+ return null;
+ }
+
+ childs.add(child);
+ }
+
+ // order children by orderNumber, as HashSet returns children in other order
+ Collections.sort(childs, new NodesOrderComparator<NodeData>());
+ return childs;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getChildNodesCount(NodeData parent)
+ {
+ return getChildNodesCount.run(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<PropertyData> getChildProperties(NodeData parent)
+ {
+ return getChildProps(parent.getIdentifier(), true);
+ }
+
+ public List<PropertyData> getChildProperties(NodeData parent, QPathEntryFilter pattern)
+ {
+ // get list of children uuids
+ final Map<QPathEntryFilter, Set<String>> patterns =
+ (Map<QPathEntryFilter, Set<String>>)cache.get(new CachePatternPropsId(parent.getIdentifier()));
+
+ if (patterns == null)
+ {
+ return null;
+ }
+
+ Set<String> set = patterns.get(pattern);
+ if (set == null)
+ {
+ return null;
+ }
+
+ final List<PropertyData> childs = new ArrayList<PropertyData>();
+
+ for (String childId : set)
+ {
+ PropertyData child = (PropertyData)cache.get(new CacheId(childId));
+
+ if (child == null)
+ {
+ return null;
+ }
+ if (child.getValues().size() <= 0)
+ {
+ return null;
+ }
+ childs.add(child);
+ }
+ return childs;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<PropertyData> listChildProperties(NodeData parent)
+ {
+ return getChildProps(parent.getIdentifier(), false);
+ }
+
+ /**
+ * Internal get child properties.
+ *
+ * @param parentId String
+ * @param withValue boolean, if true only "full" Propeties can be returned
+ * @return List of PropertyData
+ */
+ protected List<PropertyData> getChildProps(String parentId, boolean withValue)
+ {
+ return getChildProps.run(parentId, withValue);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getSize()
+ {
+ return getSize.run();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isPatternSupported()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isChildNodesByPageSupported()
+ {
+ return true;
+ }
+
+ /**
+ * Internal put Item.
+ *
+ * @param item ItemData, new data to put in the cache
+ * @return ItemData, previous data or null
+ */
+ protected ItemData putItem(ItemData item)
+ {
+ if (item.isNode())
+ {
+ return putNode((NodeData)item, ModifyChildOption.MODIFY);
+ }
+ else
+ {
+ return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
+ }
+ }
+
+ protected ItemData putItemInBufferedCache(ItemData item)
+ {
+ if (item.isNode())
+ {
+ return putNodeInBufferedCache((NodeData)item, ModifyChildOption.MODIFY);
+ }
+ else
+ {
+ return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
+ }
+
+ }
+
+ /**
+ * Internal put Node.
+ *
+ * @param node, NodeData, new data to put in the cache
+ * @return NodeData, previous data or null
+ */
+ protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild)
+ {
+ if (node.getParentIdentifier() != null)
+ {
+ if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
+ {
+ cache.putIfAbsent(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node
+ .getIdentifier());
+ }
+ else
+ {
+ cache.put(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node.getIdentifier());
+ }
+
+ // if MODIFY and List present OR FORCE_MODIFY, then write
+ if (modifyListsOfChild != ModifyChildOption.NOT_MODIFY)
+ {
+ cache.addToPatternList(new CachePatternNodesId(node.getParentIdentifier()), node);
+ cache.addToList(new CacheNodesId(node.getParentIdentifier()), node.getIdentifier(),
+ modifyListsOfChild == ModifyChildOption.FORCE_MODIFY);
+
+ cache.remove(new CacheNodesByPageId(node.getParentIdentifier()));
+ }
+ }
+
+ if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
+ {
+ return (ItemData)cache.putIfAbsent(new CacheId(node.getIdentifier()), node);
+ }
+ else
+ {
+ return (ItemData)cache.put(new CacheId(node.getIdentifier()), node, true);
+ }
+ }
+
+ protected ItemData putNodeInBufferedCache(NodeData node, ModifyChildOption modifyListsOfChild)
+ {
+ if (node.getParentIdentifier() != null)
+ {
+ cache.put(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node.getIdentifier());
+
+ // if MODIFY and List present OR FORCE_MODIFY, then write
+ if (modifyListsOfChild != ModifyChildOption.NOT_MODIFY)
+ {
+ cache.addToList(new CacheNodesId(node.getParentIdentifier()), node.getIdentifier(),
+ modifyListsOfChild == ModifyChildOption.FORCE_MODIFY);
+ }
+ }
+
+ // NullNodeData must never be returned inside internal cache operations.
+ ItemData itemData = (ItemData)cache.putInBuffer(new CacheId(node.getIdentifier()), node);
+ return (itemData instanceof NullItemData) ? null : itemData;
+ }
+
+ /**
+ * Internal put NullNode.
+ *
+ * @param item, NullItemData, new data to put in the cache
+ */
+ protected void putNullItem(NullItemData item)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+ cache.setLocal(true);
+
+ if (!item.getIdentifier().equals(NullItemData.NULL_ID))
+ {
+ cache.putIfAbsent(new CacheId(item.getIdentifier()), item);
+ }
+ else if (item.getName() != null && item.getParentIdentifier() != null)
+ {
+ cache.putIfAbsent(new CacheQPath(item.getParentIdentifier(), item.getName(), ItemType.getItemType(item)),
+ NullItemData.NULL_ID);
+ }
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * Internal put Property.
+ *
+ * @param node, PropertyData, new data to put in the cache
+ * @return PropertyData, previous data or null
+ */
+ protected PropertyData putProperty(PropertyData prop, ModifyChildOption modifyListsOfChild)
+ {
+ // if MODIFY and List present OR FORCE_MODIFY, then write
+ if (modifyListsOfChild != ModifyChildOption.NOT_MODIFY)
+ {
+ cache.addToPatternList(new CachePatternPropsId(prop.getParentIdentifier()), prop);
+ cache.addToList(new CachePropsId(prop.getParentIdentifier()), prop.getIdentifier(),
+ modifyListsOfChild == ModifyChildOption.FORCE_MODIFY);
+ }
+ if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
+ {
+ cache.putIfAbsent(new CacheQPath(prop.getParentIdentifier(), prop.getQPath(), ItemType.PROPERTY), prop.getIdentifier());
+ }
+ else
+ {
+ cache.put(new CacheQPath(prop.getParentIdentifier(), prop.getQPath(), ItemType.PROPERTY), prop.getIdentifier());
+ }
+
+
+ // add referenced property
+ if (modifyListsOfChild != ModifyChildOption.NOT_MODIFY && prop.getType() == PropertyType.REFERENCE)
+ {
+ List<ValueData> lData = prop.getValues();
+ for (int i = 0, length = lData.size(); i < length; i++)
+ {
+ ValueData vdata = lData.get(i);
+ String nodeIdentifier = null;
+ try
+ {
+ nodeIdentifier = new String(vdata.getAsByteArray(), Constants.DEFAULT_ENCODING);
+ }
+ catch (IllegalStateException e)
+ {
+ // Do nothing. Never happens.
+ }
+ catch (IOException e)
+ {
+ // Do nothing. Never happens.
+ }
+ cache.addToList(new CacheRefsId(nodeIdentifier), prop.getIdentifier(),
+ modifyListsOfChild == ModifyChildOption.FORCE_MODIFY);
+ }
+ }
+ // NullItemData must never be returned inside internal cache operations.
+ PropertyData propData;
+ if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
+ {
+ propData = (PropertyData)cache.putIfAbsent(new CacheId(prop.getIdentifier()), prop);
+ }
+ else
+ {
+ propData = (PropertyData)cache.put(new CacheId(prop.getIdentifier()), prop, true);
+ }
+
+ return (propData instanceof NullPropertyData) ? null : propData;
+ }
+
+ protected void removeItem(ItemData item)
+ {
+ cache.remove(new CacheId(item.getIdentifier()));
+ cache.remove(new CacheQPath(item.getParentIdentifier(), item.getQPath(), ItemType.getItemType(item)));
+
+ if (item.isNode())
+ {
+ if (item.getParentIdentifier() != null)
+ {
+ cache.removeFromPatternList(new CachePatternNodesId(item.getParentIdentifier()), item);
+ cache.removeFromList(new CacheNodesId(item.getParentIdentifier()), item.getIdentifier());
+ cache.remove(new CacheNodesByPageId(item.getParentIdentifier()));
+ }
+
+ cache.remove(new CacheNodesId(item.getIdentifier()));
+ cache.remove(new CachePropsId(item.getIdentifier()));
+ cache.remove(new CacheNodesByPageId(item.getIdentifier()));
+ cache.remove(new CachePatternNodesId(item.getIdentifier()));
+ cache.remove(new CachePatternPropsId(item.getIdentifier()));
+ cache.remove(new CacheRefsId(item.getIdentifier()));
+ }
+ else
+ {
+ cache.removeFromPatternList(new CachePatternPropsId(item.getParentIdentifier()), item);
+ cache.removeFromList(new CachePropsId(item.getParentIdentifier()), item.getIdentifier());
+ }
+ }
+
+ /**
+ * Update Node's mixin and ACL.
+ *
+ * @param node NodeData
+ */
+ protected void updateMixin(NodeData node)
+ {
+ NodeData prevData = (NodeData)cache.put(new CacheId(node.getIdentifier()), node, true);
+ // prevent update NullNodeData
+ if (!(prevData instanceof NullNodeData))
+ {
+ if (prevData != null)
+ {
+ // do update ACL if needed
+ if (prevData.getACL() == null || !prevData.getACL().equals(node.getACL()))
+ {
+ updateChildsACL(node.getIdentifier(), node.getACL());
+ }
+ }
+ else if (LOG.isDebugEnabled())
+ {
+ LOG.debug("Previous NodeData not found for mixin update " + node.getQPath().getAsString());
+ }
+ }
+ }
+
+ /**
+ * Update Node hierachy in case of same-name siblings reorder.
+ * Assumes the new (updated) nodes already putted in the cache. Previous name of updated nodes will be calculated
+ * and that node will be deleted (if has same id as the new node). Childs paths will be updated to a new node path.
+ *
+ * @param node NodeData
+ * @param prevNode NodeData
+ */
+ protected void updateInBuffer(final NodeData node, final NodeData prevNode)
+ {
+ // I expect that NullNodeData will never update existing NodeData.
+ CacheQPath prevKey = new CacheQPath(node.getParentIdentifier(), prevNode.getQPath(), ItemType.NODE);
+ if (node.getIdentifier().equals(cache.getFromBuffer(prevKey)))
+ {
+ cache.remove(prevKey);
+ }
+
+ // update childs paths if index changed
+ int nodeIndex = node.getQPath().getEntries()[node.getQPath().getEntries().length - 1].getIndex();
+ int prevNodeIndex = prevNode.getQPath().getEntries()[prevNode.getQPath().getEntries().length - 1].getIndex();
+ if (nodeIndex != prevNodeIndex)
+ {
+ // its a samename reordering
+ updateTreePath(prevNode.getQPath(), node.getQPath(), null); // don't change ACL, it's same parent
+ }
+ }
+
+ /**
+ * Check all items in cache - is it descendant of prevRootPath, and update path according newRootPath.
+ *
+ * @param prevRootPath
+ * @param newRootPath
+ * @param acl
+ */
+ protected void updateTreePath(final QPath prevRootPath, final QPath newRootPath, final AccessControlList acl)
+ {
+ boolean inheritACL = acl != null;
+
+ // check all ITEMS in cache
+ Iterator<CacheKey> keys = cache.keySet().iterator();
+
+ while (keys.hasNext())
+ {
+ CacheKey key = keys.next();
+ if (key instanceof CacheId)
+ {
+ ItemData data = (ItemData)cache.get(key);
+
+ if (data != null)
+ {
+ // check is this descendant of prevRootPath
+ QPath nodeQPath = data.getQPath();
+ if (nodeQPath != null && nodeQPath.isDescendantOf(prevRootPath))
+ {
+ //make relative path
+ QPathEntry[] relativePath = null;
+ try
+ {
+ relativePath = nodeQPath.getRelPath(nodeQPath.getDepth() - prevRootPath.getDepth());
+ }
+ catch (IllegalPathException e)
+ {
+ // Do nothing. Never happens.
+ }
+
+ // make new path - no matter node or property
+ QPath newPath = QPath.makeChildPath(newRootPath, relativePath);
+
+ if (data.isNode())
+ {
+ // update node
+ NodeData prevNode = (NodeData)data;
+
+ TransientNodeData newNode =
+ new TransientNodeData(newPath, prevNode.getIdentifier(), prevNode.getPersistedVersion(),
+ prevNode.getPrimaryTypeName(), prevNode.getMixinTypeNames(), prevNode.getOrderNumber(),
+ prevNode.getParentIdentifier(), inheritACL ? acl : prevNode.getACL());
+
+ // update this node
+ cache.put(new CacheId(newNode.getIdentifier()), newNode);
+ }
+ else
+ {
+ //update property
+ PropertyData prevProp = (PropertyData)data;
+
+ if (inheritACL
+ && (prevProp.getQPath().getName().equals(Constants.EXO_PERMISSIONS) || prevProp.getQPath()
+ .getName().equals(Constants.EXO_OWNER)))
+ {
+ inheritACL = false;
+ }
+
+ TransientPropertyData newProp =
+ new TransientPropertyData(newPath, prevProp.getIdentifier(), prevProp.getPersistedVersion(),
+ prevProp.getType(), prevProp.getParentIdentifier(), prevProp.isMultiValued(), prevProp
+ .getValues());
+
+ // update this property
+ cache.put(new CacheId(newProp.getIdentifier()), newProp);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Update child Nodes ACLs.
+ *
+ * @param parentId String - root node id of JCR subtree.
+ * @param acl AccessControlList
+ */
+ protected void updateChildsACL(final String parentId, final AccessControlList acl)
+ {
+ loop: for (Iterator<NodeData> iter = new ChildNodesIterator<NodeData>(parentId); iter.hasNext();)
+ {
+ NodeData prevNode = iter.next();
+
+ // is ACL changes on this node (i.e. ACL inheritance brokes)
+ for (InternalQName mixin : prevNode.getMixinTypeNames())
+ {
+ if (mixin.equals(Constants.EXO_PRIVILEGEABLE) || mixin.equals(Constants.EXO_OWNEABLE))
+ {
+ continue loop;
+ }
+ }
+
+ // recreate with new path for child Nodes only
+ TransientNodeData newNode =
+ new TransientNodeData(prevNode.getQPath(), prevNode.getIdentifier(), prevNode.getPersistedVersion(),
+ prevNode.getPrimaryTypeName(), prevNode.getMixinTypeNames(), prevNode.getOrderNumber(), prevNode
+ .getParentIdentifier(), acl);
+
+ // update this node
+ cache.put(new CacheId(newNode.getIdentifier()), newNode);
+
+ // update childs recursive
+ updateChildsACL(newNode.getIdentifier(), acl);
+ }
+ }
+
+ public void beginTransaction()
+ {
+ cache.beginTransaction();
+ }
+
+ public void commitTransaction()
+ {
+ cache.commitTransaction();
+ }
+
+ public void rollbackTransaction()
+ {
+ cache.rollbackTransaction();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
+
+ /**
+ * <li>NOT_MODIFY - node(property) is not added to the parent's list
+ * (no persistent changes performed, cache used as cache)</li>
+ * <li>MODIFY - node(property) is added to the parent's list if parent in the cache
+ * (new item is added to persistent, add to list if it is present)</li>
+ * <li>FORCE_MODIFY - node(property) is added to the parent's list anyway (when list is read from DB, forcing write)</li>
+ */
+ private enum ModifyChildOption {
+ NOT_MODIFY, MODIFY, FORCE_MODIFY
+ }
+
+ /**
+ * Allows to commit the cache changes in a dedicated XA Tx in order to avoid potential
+ * deadlocks
+ */
+ private void dedicatedTxCommit()
+ {
+ commitTransaction.run();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addReferencedProperties(String identifier, List<PropertyData> refProperties)
+ {
+ boolean inTransaction = cache.isTransactionActive();
+ try
+ {
+ if (!inTransaction)
+ {
+ cache.beginTransaction();
+ }
+ cache.setLocal(true);
+
+ Set<Object> set = new HashSet<Object>();
+ for (PropertyData prop : refProperties)
+ {
+ putProperty(prop, ModifyChildOption.NOT_MODIFY);
+ set.add(prop.getIdentifier());
+ }
+ cache.putIfAbsent(new CacheRefsId(identifier), set);
+ }
+ finally
+ {
+ cache.setLocal(false);
+ if (!inTransaction)
+ {
+ dedicatedTxCommit();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<PropertyData> getReferencedProperties(String identifier)
+ {
+ return getReferencedProperties.run(identifier);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void backup(File storageDir) throws BackupException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Managed
+ @ManagedDescription("Remove all the existing items from the cache")
+ public void clean() throws BackupException
+ {
+ if (cache.getStatus() == ComponentStatus.RUNNING)
+ {
+ cache.clear();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DataRestore getDataRestorer(DataRestoreContext context) throws BackupException
+ {
+ return new DataRestore()
+ {
+ /**
+ * {@inheritDoc}
+ */
+ public void clean() throws BackupException
+ {
+ cache.clear();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void restore() throws BackupException
+ {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void commit() throws BackupException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void rollback() throws BackupException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void close() throws BackupException
+ {
+ }
+ };
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addListener(WorkspaceStorageCacheListener listener)
+ {
+ listeners.add(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeListener(WorkspaceStorageCacheListener listener)
+ {
+ listeners.remove(listener);
+ }
+
+ /**
+ * Called when a cache entry corresponding to the given node has item updated
+ * @param data the item corresponding to the updated cache entry
+ */
+ private void onCacheEntryUpdated(ItemData data)
+ {
+ if (data == null || data instanceof NullItemData)
+ {
+ return;
+ }
+ for (WorkspaceStorageCacheListener listener : listeners)
+ {
+ try
+ {
+ listener.onCacheEntryUpdated(data);
+ }
+ catch (Exception e)
+ {
+ LOG.warn("The method onCacheEntryUpdated fails for the listener " + listener.getClass(), e);
+ }
+ }
+ }
+
+ /**
+ * Actions that are not supposed to be called within a transaction
+ *
+ * Created by The eXo Platform SAS
+ * Author : Nicolas Filotto
+ * nicolas.filotto at exoplatform.com
+ * 21 janv. 2010
+ */
+ protected abstract class CacheActionNonTxAware<R, A> extends ActionNonTxAware<R, A, RuntimeException>
+ {
+ /**
+ * {@inheritDoc}
+ */
+ protected TransactionManager getTransactionManager()
+ {
+ return ISPNCacheWorkspaceStorageCache.this.getTransactionManager();
+ }
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Listener
+ public class CacheEventListener
+ {
+
+ @CacheEntryModified
+ public void cacheEntryModified(CacheEntryModifiedEvent evt)
+ {
+ if (!evt.isPre() && evt.getKey() instanceof CacheId)
+ {
+ final ItemData value = (ItemData)evt.getValue();
+ onCacheEntryUpdated(value);
+ }
+ }
+ }
+}
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,262 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.jcr.infinispan;
+
+import org.exoplatform.commons.utils.SecurityHelper;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.config.TemplateConfigurationHelper;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.infinispan.Cache;
+import org.infinispan.config.Configuration;
+import org.infinispan.config.GlobalConfiguration;
+import org.infinispan.jmx.MBeanServerLookup;
+import org.infinispan.manager.DefaultCacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+import java.net.URL;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedExceptionAction;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.management.MBeanServer;
+
+/**
+ * Factory that creates and starts pre-configured instances of Infinispan.
+ * Path to Infinispan configuration or template and cache name should be
+ * provided as "infinispan-configuration" and "infinispan-cache-name" properties
+ * in parameterEntry instance respectively.
+ *
+ * @author <a href="mailto:nikolazius at gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: InfinispanCacheFactory.java 3001 2010-08-30 06:56:05Z tolusha $
+ *
+ */
+public class ISPNCacheFactory<K, V>
+{
+
+ public static final String INFINISPAN_CONFIG = "infinispan-configuration";
+
+ private final ConfigurationManager configurationManager;
+
+ private final TemplateConfigurationHelper configurationHelper;
+
+ private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.InfinispanCacheFactory");
+
+ /**
+ * A Map that contains all the registered CacheManager order by {@link ExoContainer}
+ * instances and {@link GlobalConfiguration}.
+ */
+ private static Map<GlobalConfiguration, EmbeddedCacheManager> CACHE_MANAGERS =
+ new HashMap<GlobalConfiguration, EmbeddedCacheManager>();
+
+ private static final MBeanServerLookup MBEAN_SERVER_LOOKUP = new MBeanServerLookup()
+ {
+ public MBeanServer getMBeanServer(Properties properties)
+ {
+ return ExoContainerContext.getTopContainer().getMBeanServer();
+ }
+ };
+
+ /**
+ * Creates InfinispanCacheFactory with provided configuration transaction managers.
+ * Transaction manager will later be injected to cache instance.
+ *
+ * @param configurationManager
+ */
+ public ISPNCacheFactory(ConfigurationManager configurationManager)
+ {
+ this.configurationManager = configurationManager;
+ this.configurationHelper = new ISPNCacheHelper(configurationManager);
+ }
+
+ /**
+ * Factory that creates and starts pre-configured instances of Infinispan.
+ * Path to Infinispan configuration or template should be provided as
+ * "infinispan-configuration" property in parameterEntry instance.
+ * <br>
+ *
+ * @param regionId the unique id of the cache region to create
+ * @param parameterEntry
+ * @return
+ * @throws RepositoryConfigurationException
+ */
+ public Cache<K, V> createCache(final String regionId, MappedParametrizedObjectEntry parameterEntry)
+ throws RepositoryConfigurationException
+ {
+ // get Infinispan configuration file path
+ final String configurationPath = parameterEntry.getParameterValue(INFINISPAN_CONFIG);
+ log.info("Infinispan Cache configuration used: " + configurationPath);
+ // avoid dashes in cache name. Some SQL servers doesn't allow dashes in table names
+ final String regionIdEscaped = regionId.replace("-", "_");
+ // prepare configuration
+ final InputStream configStream;
+ try
+ {
+ // fill template
+ configStream = configurationHelper.fillTemplate(configurationPath, parameterEntry.getParameters());
+ }
+ catch (IOException e)
+ {
+ throw new RepositoryConfigurationException(e);
+ }
+
+ // create cache
+ final EmbeddedCacheManager manager;
+ try
+ {
+ // creating new CacheManager using SecurityHelper
+
+ manager = SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<EmbeddedCacheManager>()
+ {
+ public EmbeddedCacheManager run() throws IOException
+ {
+ DefaultCacheManager manager = new DefaultCacheManager(configStream, false);
+ loadJGroupsConfig(manager);
+ return getUniqueInstance(regionIdEscaped, manager);
+ }
+ });
+
+ }
+ catch (IOException e)
+ {
+ throw new RepositoryConfigurationException(e);
+ }
+
+ PrivilegedAction<Cache<K, V>> action = new PrivilegedAction<Cache<K, V>>()
+ {
+ public Cache<K, V> run()
+ {
+ return manager.getCache(regionIdEscaped);
+ }
+ };
+ Cache<K, V> cache = SecurityHelper.doPrivilegedAction(action);
+
+ return cache;
+ }
+
+ /**
+ * This method is used to load the file corresponding to the path set on the property
+ * <tt>configurationFile</tt> using the configuration manager, then set the XML content
+ * as value of the property <tt>configurationXml</tt>.
+ * @param manager the manager from which we extract the transport properties in which
+ * we will find the path of the JGroups configuration
+ * @throws IOException if the configuration file cannot be read
+ */
+ private void loadJGroupsConfig(DefaultCacheManager manager) throws IOException
+ {
+ Properties p = manager.getGlobalConfiguration().getTransportProperties();
+ if (p != null && p.containsKey("configurationFile"))
+ {
+ URL jgroupsConfigURL = null;
+ InputStream jgroupsConfigInputStream = null;
+ try
+ {
+ // Trying to get the configuration from the configuration manager
+ String configurationFile = p.getProperty("configurationFile");
+ jgroupsConfigInputStream = configurationManager.getInputStream(configurationFile);
+ jgroupsConfigURL = configurationManager.getResource(configurationFile);
+ }
+ catch (Exception e)
+ {
+ // ignore me
+ }
+ if (jgroupsConfigInputStream != null)
+ {
+ try
+ {
+ log.info("Custom JGroups configuration set: " + jgroupsConfigURL);
+
+ // Read stream content into StringWriter
+ StringWriter sw = new StringWriter();
+ InputStreamReader in = new InputStreamReader(jgroupsConfigInputStream);
+
+ char[] buffer = new char[1024];
+ int n = 0;
+ while (-1 != (n = in.read(buffer)))
+ {
+ sw.write(buffer, 0, n);
+ }
+
+ p.setProperty("configurationXml", sw.toString());
+ p.remove("configurationFile");
+ }
+ finally
+ {
+ jgroupsConfigInputStream.close();
+ }
+ }
+ }
+ }
+
+ /**
+ * Try to find if a {@link EmbeddedCacheManager} of the same type (i.e. their {@link GlobalConfiguration} are equals)
+ * has already been registered for the same current container.
+ * If no cache manager has been registered, we register the given cache manager otherwise we
+ * use the previously registered cache manager and we define a dedicated region for the related cache.
+ * @param regionId the unique id of the cache region to create
+ * @param manager the current cache manager of the cache to create
+ * @return the given cache manager if it has not been registered otherwise the cache manager of the same
+ * type that has already been registered..
+ */
+ private static synchronized EmbeddedCacheManager getUniqueInstance(String regionId, EmbeddedCacheManager manager)
+ {
+ GlobalConfiguration gc = manager.getGlobalConfiguration();
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ // Ensure that the cluster name won't be used between 2 ExoContainers
+ gc.fluent().transport().clusterName(gc.getClusterName() + "_" + container.getContext().getName())
+ .globalJmxStatistics().cacheManagerName(gc.getCacheManagerName() + "_" + container.getContext().getName()).
+ // Configure the MBeanServerLookup
+ mBeanServerLookup(MBEAN_SERVER_LOOKUP);
+ Configuration conf = manager.getDefaultConfiguration();
+ if (CACHE_MANAGERS.containsKey(gc))
+ {
+ manager = CACHE_MANAGERS.get(gc);
+ }
+ else
+ {
+ // Reset the manager before storing it into the map since the default config is used as
+ // template to define a new configuration
+ manager = new DefaultCacheManager(gc);
+ CACHE_MANAGERS.put(gc, manager);
+ if (log.isInfoEnabled())
+ {
+ log.info("A new ISPN Cache Manager instance has been registered for the region " + regionId
+ + " and the container " + container.getContext().getName());
+ }
+ }
+ // Define the configuration of the cache
+ manager.defineConfiguration(regionId, conf);
+ if (log.isInfoEnabled())
+ {
+ log.info("The region " + regionId + " has been registered for the container "
+ + container.getContext().getName());
+ }
+ return manager;
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.jcr.infinispan;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.services.jcr.config.TemplateConfigurationHelper;
+
+/**
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: ISPNCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
+ *
+ */
+public class ISPNCacheHelper extends TemplateConfigurationHelper
+{
+
+ /**
+ * Creates configuration cache helper with pre-configured for Infinispan cache parameters,<br>
+ * including: "infinispan-*" and "jgroups-configuration", and excluding "infinispan-configuration"
+ *
+ * @param cfm
+ * instance for looking up resources
+ */
+ public ISPNCacheHelper(ConfigurationManager cfm)
+ {
+ super(new String[]{"^jgroups-configuration", "^infinispan-.*"}, new String[]{"^infinispan-configuration"}, cfm);
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.jcr.infinispan;
+
+import org.exoplatform.commons.utils.SecurityHelper;
+import org.infinispan.Cache;
+
+import java.io.Serializable;
+import java.security.PrivilegedAction;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: PrivilegedCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
+ *
+ */
+public class PrivilegedISPNCacheHelper
+{
+
+ /**
+ * Start Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void start(final Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.start();
+ return null;
+ }
+ };
+ SecurityHelper.doPrivilegedAction(action);
+ }
+
+ /**
+ * Stop Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void stop(final Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.stop();
+ return null;
+ }
+ };
+ SecurityHelper.doPrivilegedAction(action);
+ }
+
+ /**
+ * Put in Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object putIfAbsent(final Cache<Serializable, Object> cache, final Serializable key, final Object value)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ return cache.putIfAbsent(key, value);
+ }
+ };
+ return SecurityHelper.doPrivilegedAction(action);
+ }
+
+ /**
+ * Put in Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object put(final Cache<Serializable, Object> cache, final Serializable key, final Object value)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ return cache.put(key, value);
+ }
+ };
+ return SecurityHelper.doPrivilegedAction(action);
+ }
+
+ /**
+ * Put in Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object put(final Cache<Serializable, Object> cache, final Serializable key, final Object value,
+ final long lifespan, final TimeUnit unit)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ return cache.put(key, value, lifespan, unit);
+ }
+ };
+ return SecurityHelper.doPrivilegedAction(action);
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/GenericTransactionService.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/GenericTransactionService.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/GenericTransactionService.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.transaction.infinispan;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.services.transaction.impl.AbstractTransactionService;
+import org.infinispan.transaction.lookup.TransactionManagerLookup;
+
+import javax.transaction.TransactionManager;
+
+/**
+ * @author <a href="mailto:dmitry.kataev at exoplatform.com">Dmytro Katayev</a>
+ * @version $Id: GenericTransactionService.java -1 $
+ */
+public class GenericTransactionService extends AbstractTransactionService
+{
+
+ /**
+ * TransactionManagerLookup.
+ */
+ protected final TransactionManagerLookup tmLookup;
+
+ /**
+ * JBossTransactionManagerLookup constructor.
+ *
+ * @param tmLookup TransactionManagerLookup
+ */
+ public GenericTransactionService(TransactionManagerLookup tmLookup)
+ {
+ this(tmLookup, null);
+ }
+
+ public GenericTransactionService(TransactionManagerLookup tmLookup, InitParams params)
+ {
+ super(params);
+ this.tmLookup = tmLookup;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TransactionManager findTransactionManager() throws Exception
+ {
+ return tmLookup.getTransactionManager();
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.transaction.infinispan;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.transaction.TransactionService;
+import org.infinispan.transaction.lookup.TransactionManagerLookup;
+
+import java.lang.reflect.Method;
+
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
+
+/**
+ * This class is used to replace the one provided by default in ISPN 5.0 since
+ * it implicitly requires that ISPN is initialized before the rest which is actually
+ * the exact opposite. Indeed Arjuna accessors are initialized in the init method which is
+ * called at ISPN initialization but we expect to get the {@link TransactionManager}
+ * from it through the {@link TransactionService} before initializing the JCR so before
+ * initializing ISPN.
+ *
+ * The code below is a simple copy/paste of the code of
+ * {@link org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup} of ISPN 4.
+ *
+ * @author <a href="mailto:nfilotto at exoplatform.com">Nicolas Filotto</a>
+ * @version $Id$
+ *
+ */
+public class JBossStandaloneJTAManagerLookup implements TransactionManagerLookup
+{
+ /**
+ * The logger
+ */
+ private static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.impl.infinispan.v5.JBossStandaloneJTAManagerLookup");
+
+ private Method manager, user;
+
+ public JBossStandaloneJTAManagerLookup()
+ {
+ try
+ {
+ manager = loadClassStrict("com.arjuna.ats.jta.TransactionManager").getMethod("transactionManager");
+ user = loadClassStrict("com.arjuna.ats.jta.UserTransaction").getMethod("userTransaction");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public TransactionManager getTransactionManager() throws Exception
+ {
+ TransactionManager tm = (TransactionManager)manager.invoke(null);
+ if (tm == null && LOG.isWarnEnabled())
+ {
+ LOG.warn("The transaction manager could not be found");
+ }
+ return tm;
+ }
+
+ public UserTransaction getUserTransaction() throws Exception
+ {
+ UserTransaction ut = (UserTransaction)user.invoke(null);
+ if (ut == null && LOG.isWarnEnabled())
+ {
+ LOG.warn("The user transaction could not be found");
+ }
+ return ut;
+ }
+
+ /**
+ * Loads the specified class using this class's classloader, or, if it is <code>null</code> (i.e. this class was
+ * loaded by the bootstrap classloader), the system classloader. <p/> If loadtime instrumentation via
+ * GenerateInstrumentedClassLoader is used, this class may be loaded by the bootstrap classloader. <p/>
+ *
+ * @param classname name of the class to load
+ * @return the class
+ * @throws ClassNotFoundException
+ */
+ private static Class<?> loadClassStrict(String classname) throws ClassNotFoundException
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ if (cl == null)
+ cl = ClassLoader.getSystemClassLoader();
+ return cl.loadClass(classname);
+ }
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossTransactionsService.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossTransactionsService.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/transaction/infinispan/JBossTransactionsService.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.transaction.infinispan;
+
+import org.exoplatform.container.xml.InitParams;
+import org.infinispan.transaction.lookup.TransactionManagerLookup;
+
+import javax.transaction.UserTransaction;
+
+/**
+ * Add the specific part for Arjuna
+ *
+ * @author <a href="mailto:nicolas.filotto at exoplatform.com">Nicolas Filotto</a>
+ * @version $Id$
+ *
+ */
+public class JBossTransactionsService extends GenericTransactionService
+{
+
+ public JBossTransactionsService(TransactionManagerLookup tmLookup)
+ {
+ super(tmLookup);
+ }
+
+ public JBossTransactionsService(TransactionManagerLookup tmLookup, InitParams params)
+ {
+ super(tmLookup, params);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected UserTransaction findUserTransaction() throws Exception
+ {
+ return com.arjuna.ats.jta.UserTransaction.userTransaction();
+ }
+}
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-data.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="${jgroups-configuration}"/>
+ </properties>
+ </transport>
+ </global>
+
+ <default>
+ <clustering mode="replication">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <sync replTimeout="20000"/>
+ </clustering>
+
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="LRU" threadPolicy="DEFAULT" maxEntries="1000000"/>
+ <expiration wakeUpInterval="5000"/>
+ </default>
+</infinispan>
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="${jgroups-configuration}"/>
+ </properties>
+ </transport>
+ </global>
+
+ <default>
+ <clustering mode="replication">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <sync replTimeout="20000"/>
+ </clustering>
+
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="NONE"/>
+
+ <loaders passivation="false" shared="false" preload="false">
+ <loader class="${infinispan-cachestore-classname}" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <async enabled="false"/>
+ </loader>
+ </loaders>
+ </default>
+</infinispan>
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="${jgroups-configuration}"/>
+ </properties>
+ </transport>
+ </global>
+
+ <default>
+ <clustering mode="replication">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <sync replTimeout="20000"/>
+ </clustering>
+
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="NONE"/>
+
+ <loaders passivation="false" shared="true" preload="true">
+ <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" 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}"/>
+ <property name="dataColumnName" value="${infinispan-cl-cache.jdbc.data.column}"/>
+ <property name="timestampColumnName" value="${infinispan-cl-cache.jdbc.timestamp.column}"/>
+ <property name="idColumnType" value="${infinispan-cl-cache.jdbc.id.type}"/>
+ <property name="dataColumnType" value="${infinispan-cl-cache.jdbc.data.type}"/>
+ <property name="timestampColumnType" value="${infinispan-cl-cache.jdbc.timestamp.type}"/>
+ <property name="dropTableOnExit" value="${infinispan-cl-cache.jdbc.table.drop}"/>
+ <property name="createTableOnStart" value="${infinispan-cl-cache.jdbc.table.create}"/>
+ <property name="connectionFactoryClass" value="${infinispan-cl-cache.jdbc.connectionFactory}"/>
+ <property name="datasourceJndiLocation" value="${infinispan-cl-cache.jdbc.datasource}"/>
+ </properties>
+ <async enabled="false"/>
+ </loader>
+ </loaders>
+ </default>
+
+</infinispan>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/exo-jcr-ispn-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/exo-jcr-ispn-config.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/main/resources/conf/portal/exo-jcr-ispn-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,214 @@
+<!--
+
+ 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.
+
+-->
+<repository-service default-repository="repository">
+ <repositories>
+ <repository name="repository" system-workspace="production" default-workspace="production">
+ <security-domain>exo-domain</security-domain>
+ <access-control>optional</access-control>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="production">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/production" />
+ </properties>
+ <value-storages>
+ <value-storage id="production" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/production" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="true"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-data.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/production" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="backup">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/backup" />
+ </properties>
+ <value-storages>
+ <value-storage id="backup" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/backup" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="true"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-data.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/backup" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="digital-assets">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/digital-assets" />
+ </properties>
+ <value-storages>
+ <value-storage id="digital-assets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/digital-assets" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:folder" />
+ </properties>
+ </initializer>
+ <cache enabled="true"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-data.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/digital-assets" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="jar:/conf/portal/cluster/infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="jar:/conf/portal/cluster/udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCache.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCache.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2003-2011 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.cache.infinispan;
+
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import org.exoplatform.services.jcr.config.CacheEntry;
+import org.exoplatform.services.jcr.config.SimpleParameterEntry;
+import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.dataflow.persistent.WorkspaceStorageCache;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.cache.jbosscache.TestJBossCacheWorkspaceStorageCache;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache;
+
+import java.util.ArrayList;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy at gmail.com">Karpenko Sergiy</a>
+ * @version $Id: TestISPNCacheWorkspaceStorageCache.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class TestISPNCacheWorkspaceStorageCache extends TestJBossCacheWorkspaceStorageCache
+{
+ @Override
+ public WorkspaceStorageCache getCacheImpl() throws Exception
+ {
+ ArrayList<SimpleParameterEntry> list = new ArrayList<SimpleParameterEntry>();
+ list.add(new SimpleParameterEntry("infinispan-configuration", "jar:/conf/standalone/test-infinispan-config.xml"));
+
+ CacheEntry entry = new CacheEntry(list);
+ entry.setEnabled(true);
+ WorkspaceEntry workspaceEntry = new WorkspaceEntry();
+ workspaceEntry.setUniqueName("WS_UUID");
+ workspaceEntry.setCache(entry);
+ return new ISPNCacheWorkspaceStorageCache(workspaceEntry, new ConfigurationManagerImpl());
+ }
+}
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCacheInClusterMode.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCacheInClusterMode.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/infinispan/TestISPNCacheWorkspaceStorageCacheInClusterMode.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.cache.infinispan;
+
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+import org.exoplatform.services.jcr.config.CacheEntry;
+import org.exoplatform.services.jcr.config.SimpleParameterEntry;
+import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.TestWorkspaceStorageCacheInClusterMode;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.TesterISPNCacheWorkspaceStorageCache;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:nfilotto at exoplatform.com">Nicolas Filotto</a>
+ * @version $Id$
+ *
+ */
+public class TestISPNCacheWorkspaceStorageCacheInClusterMode extends TestWorkspaceStorageCacheInClusterMode<ISPNCacheWorkspaceStorageCache>
+{
+
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ public ISPNCacheWorkspaceStorageCache getCacheImpl() throws Exception
+ {
+ // Clear the Cache Factory to avoid getting several times the same cache
+ Field singletonField = ISPNCacheFactory.class.getDeclaredField("CACHE_MANAGERS");
+ singletonField.setAccessible(true);
+ Map map = (Map)singletonField.get(null);
+ Map backupMap = new HashMap(map);
+ map.clear();
+ ArrayList<SimpleParameterEntry> list = new ArrayList<SimpleParameterEntry>();
+ list.add(new SimpleParameterEntry(ISPNCacheFactory.INFINISPAN_CONFIG,
+ "jar:/conf/standalone/cluster/test-infinispan-config.xml"));
+ list.add(new SimpleParameterEntry("infinispan-cluster-name", "TestISPNCacheWorkspaceStorageCacheInClusterMode"));
+ list.add(new SimpleParameterEntry("jgroups-configuration", "classpath:/flush-udp.xml"));
+
+ CacheEntry entry = new CacheEntry(list);
+ entry.setEnabled(true);
+ WorkspaceEntry workspaceEntry = new WorkspaceEntry();
+ workspaceEntry.setCache(entry);
+ workspaceEntry.setUniqueName("MyWorkspace");
+ try
+ {
+ return new ISPNCacheWorkspaceStorageCache(workspaceEntry, new ConfigurationManagerImpl());
+ }
+ finally
+ {
+ map.clear();
+ map.putAll(backupMap);
+ }
+ }
+
+ protected void finalize(ISPNCacheWorkspaceStorageCache cache)
+ {
+ TesterISPNCacheWorkspaceStorageCache.stop(cache);
+ }
+}
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TesterISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TesterISPNCacheWorkspaceStorageCache.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TesterISPNCacheWorkspaceStorageCache.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan;
+
+/**
+ *
+ * @author <a href="mailto:azavizionov at exoplatform.com">Alexey Zavizionov</a>
+ * @version $Id: TesterISPNCacheWorkspaceStorageCache.java 34360 2009-07-22 23:58:59Z zavizionov $
+ *
+ */
+public class TesterISPNCacheWorkspaceStorageCache
+{
+
+ public static void stop(ISPNCacheWorkspaceStorageCache cache)
+ {
+ cache.cache.stop();
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/lab/infinispan/TestISPNCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/lab/infinispan/TestISPNCache.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/java/org/exoplatform/services/jcr/lab/infinispan/TestISPNCache.java 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+package org.exoplatform.services.jcr.lab.infinispan;
+
+import junit.framework.TestCase;
+
+import org.infinispan.Cache;
+import org.infinispan.config.Configuration;
+import org.infinispan.config.GlobalConfiguration;
+import org.infinispan.manager.DefaultCacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="anatoliy.bazko at exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: TestINSPCache.java 111 2010-11-11 11:11:11Z tolusha $
+ *
+ */
+public class TestISPNCache extends TestCase
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ /**
+ * Test default cache and base operation.
+ *
+ * @throws Exception
+ */
+ public void testGetCache() throws Exception
+ {
+ // Create cache manager
+ GlobalConfiguration myGlobalConfig = new GlobalConfiguration();
+ EmbeddedCacheManager manager = new DefaultCacheManager(myGlobalConfig);
+
+ // Create a cache
+ Configuration config = new Configuration();
+ manager.defineConfiguration("cache", config);
+ Cache cache = manager.getCache("cache");
+
+ cache.put("key", "value");
+ assertTrue(cache.size() == 1);
+ assertTrue(cache.containsKey("key"));
+
+ String value = (String)cache.remove("key");
+ assertTrue(value.equals("value"));
+ assertTrue(cache.isEmpty());
+
+ cache.put("key", "value");
+ cache.putIfAbsent("key", "newValue");
+ assertTrue("value".equals(cache.get("key")));
+
+ cache.clear();
+ assertTrue(cache.isEmpty());
+
+ cache.put("key", "value", 2, TimeUnit.SECONDS);
+ assertTrue(cache.containsKey("key"));
+ Thread.sleep(2000 + 500);
+ assertFalse(cache.containsKey("key"));
+ }
+
+ /**
+ * Test cluster cache and base operation.
+ *
+ * @throws Exception
+ */
+ public void testGetClusterCache() throws Exception
+ {
+ // Create cache manager
+ EmbeddedCacheManager manager = new DefaultCacheManager(GlobalConfiguration.getClusteredDefault());
+
+ // Create a cache
+ Cache cache = manager.getCache();
+
+ cache.put("key", "value");
+ assertTrue(cache.size() == 1);
+ assertTrue(cache.containsKey("key"));
+
+ String value = (String)cache.remove("key");
+ assertTrue(value.equals("value"));
+ assertTrue(cache.isEmpty());
+
+ cache.put("key", "value");
+ cache.putIfAbsent("key", "newValue");
+ assertTrue("value".equals(cache.get("key")));
+
+ cache.clear();
+ assertTrue(cache.isEmpty());
+
+ cache.put("key", "value", 2, TimeUnit.SECONDS);
+ assertTrue(cache.containsKey("key"));
+ Thread.sleep(2000 + 500);
+ assertFalse(cache.containsKey("key"));
+ }
+
+}
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-configuration.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-configuration.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,683 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
+ xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
+ <component>
+ <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+ <value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="INFO, stdout, file"/>
+
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
+ <property name="log4j.appender.stdout.threshold" value="DEBUG"/>
+
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.stdout.layout.ConversionPattern"
+ value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
+
+ <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
+ <property name="log4j.appender.file.File" value="target/jcr.log"/>
+
+ <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.file.layout.ConversionPattern"
+ value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
+
+ <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
+ <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
+ <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
+ </properties-param>
+
+ <!-- value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedSimpleLog</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.SimpleLogConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>SimpleLog properties</description>
+ <property name="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
+ <property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
+ </properties-param -->
+
+ <!-- value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedJdk14Logger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>jdk1.4 Logger properties</description>
+ <property name="handlers" value="java.util.logging.ConsoleHandler"/>
+ <property name=".level" value="FINE"/>
+ <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
+ </properties-param -->
+
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.RepositoryService</key>
+ <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>add.namespaces</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>namespaces</name>
+ <property name="test" value="http://www.apache.org/jackrabbit/test"/>
+ <property name="exojcrtest" value="http://www.exoplatform.org/jcr/test/1.0"/>
+ <property name="rma" value="http://www.rma.com/jcr/"/>
+ <property name="metadata" value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
+ <property name="dc" value="http://purl.org/dc/elements/1.1/"/>
+ <property name="publication" value="http://www.exoplatform.com/jcr/publication/1.1/"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>add.nodeType</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
+ <init-params>
+ <values-param>
+ <name>autoCreatedInNewRepository</name>
+ <description>Node types configuration file</description>
+ <value>jar:/conf/test/nodetypes-tck.xml</value>
+ <value>jar:/conf/test/nodetypes-impl.xml</value>
+ <value>jar:/conf/test/nodetypes-usecase.xml</value>
+ <value>jar:/conf/test/nodetypes-config.xml</value>
+ <value>jar:/conf/test/nodetypes-config-extended.xml</value>
+ <value>jar:/conf/test/wcm-nodetypes.xml</value>
+ <value>jar:/conf/test/nodetypes-publication-config.xml</value>
+ <value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
+ </values-param>
+
+ <values-param>
+ <name>testInitNodeTypesRepository</name>
+ <description>
+ Node types configuration file for repository with name testInitNodeTypesRepository
+ </description>
+ <value>jar:/conf/test/nodetypes-test.xml</value>
+ </values-param>
+
+ <values-param>
+ <name>testInitNodeTypesRepositoryTest2</name>
+ <description>
+ Node types configuration file for repository with name testInitNodeTypesRepositoryTest2
+ </description>
+ <value>jar:/conf/test/nodetypes-test2.xml</value>
+ </values-param>
+
+ <!--values-param>
+ <name>testInitNodeTypesRepositoryTest3</name>
+ <description>Node types from ext. Needed bacause core starup earlie than ext</description>
+ <value>jar:/conf/test/nodetypes-test3_ext.xml</value>
+ </values-param-->
+
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>jar:/conf/standalone/cluster/test-jcr-config.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="dialect" value="auto" />
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.security.Authenticator</key>
+ <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
+ </component>
+
+ <component>
+ <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
+ <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>3000</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.rpc.RPCService</key>
+ <type>org.exoplatform.services.rpc.jgv3.RPCServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>jgroups-configuration</name>
+ <value>jar:/conf/standalone/cluster/udp-mux.xml</value>
+ </value-param>
+ <value-param>
+ <name>jgroups-cluster-name</name>
+ <value>RPCService-Cluster</value>
+ </value-param>
+ <value-param>
+ <name>jgroups-default-timeout</name>
+ <value>0</value>
+ </value-param>
+ </init-params>
+ </component>
+ <!-- component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>300</value>
+ </value-param>
+ </init-params>
+ </component -->
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <!-- MVCC configured to prevent possible deadlocks when a global Tx is active -->
+ <property name="url" value="${jdbcjcr.url:jdbc:hsqldb:file:target/temp/data/portal;hsqldb.tx=mvcc}"/>
+ <property name="username" value="${jdbcjcr.username:sa}"/>
+ <property name="password" value="${jdbcjcr.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr1.url:jdbc:hsqldb:file:target/temp/data/jcr}"/>
+ <property name="username" value="${jdbcjcr1.username:sa}"/>
+ <property name="password" value="${jdbcjcr1.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr2.url:jdbc:hsqldb:file:target/temp/data/jcr2}"/>
+ <property name="username" value="${jdbcjcr2.username:sa}"/>
+ <property name="password" value="${jdbcjcr2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr3.url:jdbc:hsqldb:file:target/temp/data/jcr3}"/>
+ <property name="username" value="${jdbcjcr3.username:sa}"/>
+ <property name="password" value="${jdbcjcr3.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrtest</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ <property name="maxActive" value="100" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrdb2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcrdb2.url:jdbc:hsqldb:file:target/temp/data/portaldb2}"/>
+ <property name="username" value="${jdbcjcrdb2.username:sa}"/>
+ <property name="password" value="${jdbcjcrdb2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1db2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr1db2.url:jdbc:hsqldb:file:target/temp/data/jcrdb2}"/>
+ <property name="username" value="${jdbcjcr1db2.username:sa}"/>
+ <property name="password" value="${jdbcjcr1db2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrtck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcrtck.url:jdbc:hsqldb:file:target/temp/data/portaltck}"/>
+ <property name="username" value="${jdbcjcrtck.username:sa}"/>
+ <property name="password" value="${jdbcjcrtck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1tck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr1tck.url:jdbc:hsqldb:file:target/temp/data/jcrtck}"/>
+ <property name="username" value="${jdbcjcr1tck.username:sa}"/>
+ <property name="password" value="${jdbcjcr1tck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2tck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr2tck.url:jdbc:hsqldb:file:target/temp/data/jcr2tck}"/>
+ <property name="username" value="${jdbcjcr2tck.username:sa}"/>
+ <property name="password" value="${jdbcjcr2tck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export1"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export2"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export3"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>testdbcleaner</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${testdbcleaner.url:jdbc:hsqldb:file:target/temp/data/testdbcleaner}"/>
+ <property name="username" value="${testdbcleaner.username:sa}"/>
+ <property name="password" value="${testdbcleaner.password:}"/>
+ <property name="maxActive" value="20" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.jcr</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>repo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.jcr.Repository</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="repositoryName" value="db1"/>
+ <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>rmi.jcr</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>rmirepository</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.jcr.Repository</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.exoplatform.services.jcr.rmi.RepositoryFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="url" value="//localhost:9999/repository"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
+ <!--<import>jar:/conf/database-configuration.hsql.xml</import> -->
+</configuration>
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="${jgroups-configuration}"/>
+ </properties>
+ </transport>
+ </global>
+
+ <default>
+ <clustering mode="replication">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <sync replTimeout="20000"/>
+ </clustering>
+
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="LRU" threadPolicy="DEFAULT" maxEntries="1000000"/>
+ <expiration wakeUpInterval="5000"/>
+ </default>
+</infinispan>
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="${jgroups-configuration}"/>
+ </properties>
+ </transport>
+ </global>
+
+ <default>
+ <clustering mode="replication">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <sync replTimeout="20000"/>
+ </clustering>
+
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="NONE"/>
+
+ <loaders passivation="false" shared="false" preload="false">
+ <loader class="${infinispan-cachestore-classname}" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <async enabled="false"/>
+ </loader>
+ </loaders>
+ </default>
+</infinispan>
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+
+ <transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="${infinispan-cluster-name}" distributedSyncTimeout="20000">
+ <properties>
+ <property name="configurationFile" value="${jgroups-configuration}"/>
+ </properties>
+ </transport>
+ </global>
+
+ <default>
+ <clustering mode="replication">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <sync replTimeout="20000"/>
+ </clustering>
+
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="NONE"/>
+
+ <loaders passivation="false" shared="true" preload="true">
+ <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" 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}"/>
+ <property name="dataColumnName" value="${infinispan-cl-cache.jdbc.data.column}"/>
+ <property name="timestampColumnName" value="${infinispan-cl-cache.jdbc.timestamp.column}"/>
+ <property name="idColumnType" value="${infinispan-cl-cache.jdbc.id.type}"/>
+ <property name="dataColumnType" value="${infinispan-cl-cache.jdbc.data.type}"/>
+ <property name="timestampColumnType" value="${infinispan-cl-cache.jdbc.timestamp.type}"/>
+ <property name="dropTableOnExit" value="${infinispan-cl-cache.jdbc.table.drop}"/>
+ <property name="createTableOnStart" value="${infinispan-cl-cache.jdbc.table.create}"/>
+ <property name="connectionFactoryClass" value="${infinispan-cl-cache.jdbc.connectionFactory}"/>
+ <property name="datasourceJndiLocation" value="${infinispan-cl-cache.jdbc.datasource}"/>
+ </properties>
+ <async enabled="false"/>
+ </loader>
+ </loaders>
+ </default>
+
+</infinispan>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-jcr-config.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/test-jcr-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,695 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <!--
+
+ 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.
+ -->
+<repository-service default-repository="db1">
+ <repositories>
+ <repository name="db1" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type"
+ value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="jdbc-dialect" value="auto" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db1/ws1" />
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws2" lazy-read-threshold="1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db1/ws2" />
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws3">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr3" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws3" />
+ </properties>
+ <value-storages>
+ <!--
+ This storage is used to check whether properties are removed correctly from each value-storage
+ (TestRemoveFromValueStorage.java)
+ -->
+ <value-storage id="ws3_big"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws3_big" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="1024K" />
+ </filters>
+ </value-storage>
+ <value-storage id="ws3"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws3" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type"
+ value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db1/ws3" />
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr3" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+
+ <repository name="db2" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrdb2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/wsdb2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/wsdb2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions"
+ value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db2/ws" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1db2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1db2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1db2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;any add_node;any set_property;any remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db2/ws1" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1db2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+
+ <repository name="db1tck" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrtck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/wstck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/wstck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions"
+ value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db1tck/ws" />
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1tck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1tck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1tck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions"
+ value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db1tck/ws1" />
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1tck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws2">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr2tck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2tck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2"
+ class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2tck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions"
+ value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}"
+ class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-config.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-indexer.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="max-volatile-time" value="60" />
+ <property name="index-dir" value="target/temp/index/db1tck/ws2" />
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
+ <property name="extractorPoolSize" value="2" />
+ <property name="extractorTimeout" value="10" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/cluster/test-infinispan-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="infinispan-cluster-name" value="JCR-cluster" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2tck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service>
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/udp-mux.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/udp-mux.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/cluster/udp-mux.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,74 @@
+
+<!--
+ Default stack using IP multicasting. It is similar to the "udp"
+ stack in stacks.xml, but doesn't use streaming state transfer and flushing
+ author: Bela Ban
+-->
+
+<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">
+ <UDP
+ singleton_name="JCR-cluster"
+ mcast_port="${jgroups.udp.mcast_port:45588}"
+ tos="8"
+ ucast_recv_buf_size="20M"
+ ucast_send_buf_size="640K"
+ mcast_recv_buf_size="25M"
+ mcast_send_buf_size="640K"
+ loopback="true"
+ discard_incompatible_packets="true"
+ max_bundle_size="64K"
+ max_bundle_timeout="30"
+ ip_ttl="${jgroups.udp.ip_ttl:8}"
+ enable_bundling="true"
+ enable_diagnostics="true"
+ thread_naming_pattern="cl"
+
+ timer_type="new"
+ 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="2"
+ thread_pool.max_threads="8"
+ 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="Run"/>
+
+ <PING timeout="2000"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="30000"
+ min_interval="10000"/>
+ <FD_SOCK/>
+ <FD_ALL/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK exponential_backoff="300"
+ xmit_stagger_timeout="200"
+ use_mcast_xmit="false"
+ discard_delivered_msgs="true"/>
+ <UNICAST />
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="4M"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ view_bundling="true"/>
+ <UFC max_credits="2M"
+ min_threshold="0.4"/>
+ <MFC max_credits="2M"
+ min_threshold="0.4"/>
+ <FRAG2 frag_size="60K" />
+ <pbcast.STATE_TRANSFER />
+ <!-- pbcast.FLUSH /-->
+</config>
\ No newline at end of file
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration-sjdbc.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,504 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
+ xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
+ <component>
+ <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+ <value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="INFO, stdout, file"/>
+
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
+ <property name="log4j.appender.stdout.threshold" value="DEBUG"/>
+
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.stdout.layout.ConversionPattern"
+ value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
+
+ <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
+ <property name="log4j.appender.file.File" value="target/jcr.log"/>
+
+ <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.file.layout.ConversionPattern"
+ value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
+
+ <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
+ <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
+ <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
+ </properties-param>
+
+ <!-- value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedSimpleLog</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.SimpleLogConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>SimpleLog properties</description>
+ <property name="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
+ <property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
+ </properties-param -->
+
+ <!-- value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedJdk14Logger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>jdk1.4 Logger properties</description>
+ <property name="handlers" value="java.util.logging.ConsoleHandler"/>
+ <property name=".level" value="FINE"/>
+ <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
+ </properties-param -->
+
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.RepositoryService</key>
+ <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>add.namespaces</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>namespaces</name>
+ <property name="test" value="http://www.apache.org/jackrabbit/test"/>
+ <property name="exojcrtest" value="http://www.exoplatform.org/jcr/test/1.0"/>
+ <property name="rma" value="http://www.rma.com/jcr/"/>
+ <property name="metadata" value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
+ <property name="dc" value="http://purl.org/dc/elements/1.1/"/>
+ <property name="publication" value="http://www.exoplatform.com/jcr/publication/1.1/"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>add.nodeType</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
+ <init-params>
+ <values-param>
+ <name>autoCreatedInNewRepository</name>
+ <description>Node types configuration file</description>
+ <value>jar:/conf/test/nodetypes-tck.xml</value>
+ <value>jar:/conf/test/nodetypes-impl.xml</value>
+ <value>jar:/conf/test/nodetypes-usecase.xml</value>
+ <value>jar:/conf/test/nodetypes-config.xml</value>
+ <value>jar:/conf/test/nodetypes-config-extended.xml</value>
+ <value>jar:/conf/test/wcm-nodetypes.xml</value>
+ <value>jar:/conf/test/nodetypes-publication-config.xml</value>
+ <value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
+ </values-param>
+
+ <values-param>
+ <name>testInitNodeTypesRepository</name>
+ <description>
+ Node types configuration file for repository with name testInitNodeTypesRepository
+ </description>
+ <value>jar:/conf/test/nodetypes-test.xml</value>
+ </values-param>
+
+ <values-param>
+ <name>testInitNodeTypesRepositoryTest2</name>
+ <description>
+ Node types configuration file for repository with name testInitNodeTypesRepositoryTest2
+ </description>
+ <value>jar:/conf/test/nodetypes-test2.xml</value>
+ </values-param>
+
+ <!--values-param>
+ <name>testInitNodeTypesRepositoryTest3</name>
+ <description>Node types from ext. Needed bacause core starup earlie than ext</description>
+ <value>jar:/conf/test/nodetypes-test3_ext.xml</value>
+ </values-param-->
+
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>jar:/conf/standalone/test-jcr-config-sjdbc.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="dialect" value="auto" />
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.security.Authenticator</key>
+ <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
+ </component>
+
+ <component>
+ <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
+ <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>3000</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <!-- component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>300</value>
+ </value-param>
+ </init-params>
+ </component -->
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <!-- MVCC configured to prevent possible deadlocks when a global Tx is active -->
+ <property name="url" value="${jdbcjcr.url:jdbc:hsqldb:file:target/temp/data/portal;hsqldb.tx=mvcc}"/>
+ <property name="username" value="${jdbcjcr.username:sa}"/>
+ <property name="password" value="${jdbcjcr.password:}"/>
+ <property name="maxActive" value="20" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrtest</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ <property name="maxActive" value="100" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrdb2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcrdb2.url:jdbc:hsqldb:file:target/temp/data/portaldb2}"/>
+ <property name="username" value="${jdbcjcrdb2.username:sa}"/>
+ <property name="password" value="${jdbcjcrdb2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrtck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcrtck.url:jdbc:hsqldb:file:target/temp/data/portaltck}"/>
+ <property name="username" value="${jdbcjcrtck.username:sa}"/>
+ <property name="password" value="${jdbcjcrtck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export1"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export2"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export3"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>testdbcleaner</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${testdbcleaner.url:jdbc:hsqldb:file:target/temp/data/testdbcleaner}"/>
+ <property name="username" value="${testdbcleaner.username:sa}"/>
+ <property name="password" value="${testdbcleaner.password:}"/>
+ <property name="maxActive" value="20" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.jcr</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>repo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.jcr.Repository</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="repositoryName" value="db1"/>
+ <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>rmi.jcr</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>rmirepository</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.jcr.Repository</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.exoplatform.services.jcr.rmi.RepositoryFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="url" value="//localhost:9999/repository"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
+ <!--<import>jar:/conf/database-configuration.hsql.xml</import> -->
+</configuration>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-configuration.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,665 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
+ xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
+ <component>
+ <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+ <value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="INFO, stdout, file"/>
+
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
+ <property name="log4j.appender.stdout.threshold" value="DEBUG"/>
+
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.stdout.layout.ConversionPattern"
+ value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
+
+ <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
+ <property name="log4j.appender.file.File" value="target/jcr.log"/>
+
+ <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
+ <property name="log4j.appender.file.layout.ConversionPattern"
+ value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
+
+ <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
+ <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
+ <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
+
+ <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
+ </properties-param>
+
+ <!-- value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedSimpleLog</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.SimpleLogConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>SimpleLog properties</description>
+ <property name="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
+ <property name="org.apache.commons.logging.simplelog.showdatetime" value="true"/>
+ </properties-param -->
+
+ <!-- value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedJdk14Logger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Jdk14Configurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>jdk1.4 Logger properties</description>
+ <property name="handlers" value="java.util.logging.ConsoleHandler"/>
+ <property name=".level" value="FINE"/>
+ <property name="java.util.logging.ConsoleHandler.level" value="FINE"/>
+ </properties-param -->
+
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.RepositoryService</key>
+ <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
+ <component-plugins>
+ <component-plugin>
+ <name>add.namespaces</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>namespaces</name>
+ <property name="test" value="http://www.apache.org/jackrabbit/test"/>
+ <property name="exojcrtest" value="http://www.exoplatform.org/jcr/test/1.0"/>
+ <property name="rma" value="http://www.rma.com/jcr/"/>
+ <property name="metadata" value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
+ <property name="dc" value="http://purl.org/dc/elements/1.1/"/>
+ <property name="publication" value="http://www.exoplatform.com/jcr/publication/1.1/"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>add.nodeType</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
+ <init-params>
+ <values-param>
+ <name>autoCreatedInNewRepository</name>
+ <description>Node types configuration file</description>
+ <value>jar:/conf/test/nodetypes-tck.xml</value>
+ <value>jar:/conf/test/nodetypes-impl.xml</value>
+ <value>jar:/conf/test/nodetypes-usecase.xml</value>
+ <value>jar:/conf/test/nodetypes-config.xml</value>
+ <value>jar:/conf/test/nodetypes-config-extended.xml</value>
+ <value>jar:/conf/test/wcm-nodetypes.xml</value>
+ <value>jar:/conf/test/nodetypes-publication-config.xml</value>
+ <value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
+ </values-param>
+
+ <values-param>
+ <name>testInitNodeTypesRepository</name>
+ <description>
+ Node types configuration file for repository with name testInitNodeTypesRepository
+ </description>
+ <value>jar:/conf/test/nodetypes-test.xml</value>
+ </values-param>
+
+ <values-param>
+ <name>testInitNodeTypesRepositoryTest2</name>
+ <description>
+ Node types configuration file for repository with name testInitNodeTypesRepositoryTest2
+ </description>
+ <value>jar:/conf/test/nodetypes-test2.xml</value>
+ </values-param>
+
+ <!--values-param>
+ <name>testInitNodeTypesRepositoryTest3</name>
+ <description>Node types from ext. Needed bacause core starup earlie than ext</description>
+ <value>jar:/conf/test/nodetypes-test3_ext.xml</value>
+ </values-param-->
+
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>jar:/conf/standalone/test-jcr-config.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="dialect" value="auto" />
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="persister-class-name" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.security.Authenticator</key>
+ <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
+ </component>
+
+ <component>
+ <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
+ <type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>3000</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <!-- component>
+ <key>org.exoplatform.services.transaction.TransactionService</key>
+ <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
+ <init-params>
+ <value-param>
+ <name>timeout</name>
+ <value>300</value>
+ </value-param>
+ </init-params>
+ </component -->
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <!-- MVCC configured to prevent possible deadlocks when a global Tx is active -->
+ <property name="url" value="${jdbcjcr.url:jdbc:hsqldb:file:target/temp/data/portal;hsqldb.tx=mvcc}"/>
+ <property name="username" value="${jdbcjcr.username:sa}"/>
+ <property name="password" value="${jdbcjcr.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr1.url:jdbc:hsqldb:file:target/temp/data/jcr}"/>
+ <property name="username" value="${jdbcjcr1.username:sa}"/>
+ <property name="password" value="${jdbcjcr1.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr2.url:jdbc:hsqldb:file:target/temp/data/jcr2}"/>
+ <property name="username" value="${jdbcjcr2.username:sa}"/>
+ <property name="password" value="${jdbcjcr2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr3.url:jdbc:hsqldb:file:target/temp/data/jcr3}"/>
+ <property name="username" value="${jdbcjcr3.username:sa}"/>
+ <property name="password" value="${jdbcjcr3.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrtest</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ <property name="maxActive" value="100" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrdb2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcrdb2.url:jdbc:hsqldb:file:target/temp/data/portaldb2}"/>
+ <property name="username" value="${jdbcjcrdb2.username:sa}"/>
+ <property name="password" value="${jdbcjcrdb2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1db2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr1db2.url:jdbc:hsqldb:file:target/temp/data/jcrdb2}"/>
+ <property name="username" value="${jdbcjcr1db2.username:sa}"/>
+ <property name="password" value="${jdbcjcr1db2.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcrtck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcrtck.url:jdbc:hsqldb:file:target/temp/data/portaltck}"/>
+ <property name="username" value="${jdbcjcrtck.username:sa}"/>
+ <property name="password" value="${jdbcjcrtck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1tck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr1tck.url:jdbc:hsqldb:file:target/temp/data/jcrtck}"/>
+ <property name="username" value="${jdbcjcr1tck.username:sa}"/>
+ <property name="password" value="${jdbcjcr1tck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2tck</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${jdbcjcr2tck.url:jdbc:hsqldb:file:target/temp/data/jcr2tck}"/>
+ <property name="username" value="${jdbcjcr2tck.username:sa}"/>
+ <property name="password" value="${jdbcjcr2tck.password:}"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export1"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export2"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2export3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr2export3"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>testdbcleaner</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="${all.driverClassName:org.hsqldb.jdbcDriver}"/>
+ <property name="url" value="${testdbcleaner.url:jdbc:hsqldb:file:target/temp/data/testdbcleaner}"/>
+ <property name="username" value="${testdbcleaner.username:sa}"/>
+ <property name="password" value="${testdbcleaner.password:}"/>
+ <property name="maxActive" value="20" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.jcr</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>repo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.jcr.Repository</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="repositoryName" value="db1"/>
+ <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>rmi.jcr</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>rmirepository</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.jcr.Repository</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.exoplatform.services.jcr.rmi.RepositoryFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="url" value="//localhost:9999/repository"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
+ <!--<import>jar:/conf/database-configuration.hsql.xml</import> -->
+</configuration>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-config.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+ </global>
+
+ <default>
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="true"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="LRU" threadPolicy="DEFAULT" maxEntries="1000000"/>
+ <expiration wakeUpInterval="5000"/>
+ </default>
+</infinispan>
Added: 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 (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-infinispan-lock.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<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>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
+ <globalJmxStatistics jmxDomain="exo" enabled="true" allowDuplicateDomains="true"/>
+ </global>
+
+ <default>
+ <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="20000" writeSkewCheck="false" concurrencyLevel="500" useLockStriping="false"/>
+ <transaction transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup" syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="true"/>
+ <eviction strategy="NONE"/>
+
+ <loaders passivation="false" shared="true" preload="true">
+ <loader class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" 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}"/>
+ <property name="dataColumnName" value="${infinispan-cl-cache.jdbc.data.column}"/>
+ <property name="timestampColumnName" value="${infinispan-cl-cache.jdbc.timestamp.column}"/>
+ <property name="idColumnType" value="${infinispan-cl-cache.jdbc.id.type}"/>
+ <property name="dataColumnType" value="${infinispan-cl-cache.jdbc.data.type}"/>
+ <property name="timestampColumnType" value="${infinispan-cl-cache.jdbc.timestamp.type}"/>
+ <property name="dropTableOnExit" value="${infinispan-cl-cache.jdbc.table.drop}"/>
+ <property name="createTableOnStart" value="${infinispan-cl-cache.jdbc.table.create}"/>
+ <property name="connectionFactoryClass" value="${infinispan-cl-cache.jdbc.connectionFactory}"/>
+ <property name="datasourceJndiLocation" value="${infinispan-cl-cache.jdbc.datasource}"/>
+ </properties>
+ <async enabled="false"/>
+ </loader>
+ </loaders>
+ </default>
+
+</infinispan>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config-sjdbc.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,589 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+<repository-service default-repository="db1">
+ <repositories>
+ <repository name="db1" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="jdbc-dialect" value="auto" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws1" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws2" lazy-read-threshold="1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws2" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws3">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws3" />
+ </properties>
+ <value-storages>
+ <!--
+ This storage is used to check whether properties are removed
+ correctly from each value-storage
+ (TestRemoveFromValueStorage.java)
+ -->
+ <value-storage id="ws3_big" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws3_big" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="1024K" />
+ </filters>
+ </value-storage>
+ <value-storage id="ws3" class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws3" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws3" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+
+ <repository name="db2" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrdb2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/wsdb2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/wsdb2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db2/ws" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrdb2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1db2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1db2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;any add_node;any set_property;any remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db2/ws1" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+
+
+ <repository name="db1tck" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrtck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/wstck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/wstck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1tck/ws" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrtck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1tck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1tck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1tck/ws1" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws2">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrtck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2tck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2tck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1tck/ws2" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt"/>
+ <property name="extractorPoolSize" value="2"/>
+ <property name="extractorTimeout" value="10"/>
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/conf/standalone/test-jcr-config.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,589 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+<repository-service default-repository="db1">
+ <repositories>
+ <repository name="db1" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="jdbc-dialect" value="auto" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws1" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws2" lazy-read-threshold="1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws2" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws3">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr3" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws3" />
+ </properties>
+ <value-storages>
+ <!--
+ This storage is used to check whether properties are removed
+ correctly from each value-storage
+ (TestRemoveFromValueStorage.java)
+ -->
+ <value-storage id="ws3_big" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws3_big" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="1024K" />
+ </filters>
+ </value-storage>
+ <value-storage id="ws3" class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws3" />
+ <property name="digest-algo" value="MD5" />
+ <property name="vcas-type" value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl" />
+ <property name="jdbc-source-name" value="jdbcjcr" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1/ws3" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr3" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+
+ <repository name="db2" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrdb2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/wsdb2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/wsdb2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db2/ws" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrdb2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1db2" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1db2" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1db2" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;any add_node;any set_property;any remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db2/ws1" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1db2" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+
+
+ <repository name="db1tck" system-workspace="ws" default-workspace="ws">
+ <security-domain>exo-domain</security-domain>
+ <!-- access-control>optional</access-control -->
+ <!-- access-control>disable</access-control -->
+ <session-max-age>1h</session-max-age>
+ <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcrtck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/wstck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/wstck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1tck/ws" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1tck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws1tck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws1tck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1tck/ws1" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr1tck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+
+ <workspace name="ws2">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr2tck" />
+ <property name="dialect" value="auto" />
+ <property name="multi-db" value="true" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="target/temp/swap/ws2tck" />
+ </properties>
+ <value-storages>
+ <value-storage id="ws2" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path" value="target/temp/values/ws2tck" />
+ <property name="enabled" value="${value-storage-enabled}" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" min-value-size="100K" />
+ </filters>
+ </value-storage>
+ </value-storages>
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
+ </properties>
+ </initializer>
+ <cache enabled="${cache-enabled}" class="org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan.ISPNCacheWorkspaceStorageCache">
+ <properties>
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-config.xml" />
+ </properties>
+ </cache>
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name="index-dir" value="target/temp/index/db1tck/ws2" />
+ <property name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider" />
+ <property name="synonymprovider-config-path" value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path" value="../../indexing-configuration.xml" />
+ <property name="query-class" value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
+ <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt"/>
+ <property name="extractorPoolSize" value="2"/>
+ <property name="extractorTimeout" value="10"/>
+ </properties>
+ </query-handler>
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="infinispan-configuration" value="conf/standalone/test-infinispan-lock.xml" />
+ <property name="infinispan-cl-cache.jdbc.table.name" value="lk" />
+ <property name="infinispan-cl-cache.jdbc.table.create" value="true" />
+ <property name="infinispan-cl-cache.jdbc.table.drop" value="false" />
+ <property name="infinispan-cl-cache.jdbc.id.column" value="id" />
+ <property name="infinispan-cl-cache.jdbc.data.column" value="data" />
+ <property name="infinispan-cl-cache.jdbc.timestamp.column" value="timestamp" />
+ <property name="infinispan-cl-cache.jdbc.datasource" value="jdbcjcr2tck" />
+ <property name="infinispan-cl-cache.jdbc.connectionFactory" value="org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory" />
+ </properties>
+ </lock-manager>
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service>
Added: jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/test.policy
===================================================================
--- jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/test.policy (rev 0)
+++ jcr/trunk/exo.jcr.component.core.impl.infinispan.v5/src/test/resources/test.policy 2011-12-15 16:53:39 UTC (rev 5332)
@@ -0,0 +1,19 @@
+grant codeBase "@MAVEN_REPO at -"{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "@MAIN_CLASSES at -"{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "@TEST_CLASSES at -"{
+ permission java.lang.RuntimePermission "createSystemSession";
+ permission java.lang.RuntimePermission "createDynamicSession";
+ permission java.lang.RuntimePermission "manageRepository";
+ permission java.lang.RuntimePermission "accessRPCService";
+ permission java.lang.RuntimePermission "invokeInternalAPI";
+};
+
+grant codeBase "@MAIN_CLASSES at ../../../exo.jcr.component.core/-"{
+ permission java.security.AllPermission;
+};
\ No newline at end of file
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2011-12-15 16:30:03 UTC (rev 5331)
+++ jcr/trunk/pom.xml 2011-12-15 16:53:39 UTC (rev 5332)
@@ -82,6 +82,11 @@
<version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.ext.rpc.impl.jgroups.v3</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.exoplatform.core</groupId>
<artifactId>exo.core.component.database</artifactId>
<version>${org.exoplatform.core.version}</version>
@@ -387,12 +392,12 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>5.0.1.FINAL</version>
+ <version>5.1.0.CR1</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-jdbc</artifactId>
- <version>5.0.1.FINAL</version>
+ <version>5.1.0.CR1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -464,6 +469,7 @@
</build>
<modules>
<module>exo.jcr.component.core</module>
+ <module>exo.jcr.component.core.impl.infinispan.v5</module>
<module>exo.jcr.component.statistics</module>
<module>exo.jcr.component.ext</module>
<module>exo.jcr.component.ftp</module>
More information about the exo-jcr-commits
mailing list