Author: nfilotto
Date: 2011-08-09 10:08:31 -0400 (Tue, 09 Aug 2011)
New Revision: 4721
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TestISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCache.java
Removed:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java
Modified:
jcr/trunk/applications/exo.jcr.applications.config/pom.xml
jcr/trunk/applications/exo.jcr.ear/pom.xml
jcr/trunk/applications/product-patches/as/jboss/exo-configuration.xml
jcr/trunk/applications/product-patches/as/jetty/exo-configuration.xml
jcr/trunk/applications/product-patches/as/jonas/exo-configuration.xml
jcr/trunk/applications/product-patches/as/tomcat/exo-configuration.xml
jcr/trunk/exo.jcr.component.core/pom.xml
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
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/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/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.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/transaction-service.xml
jcr/trunk/pom.xml
Log:
EXOJCR-1475: Upgrade ISPN to 5.0.0 FINAL (JCR part)
* BufferedISPNCache has been updated to better fit with the new API
* All cache key types has been modified to add a public constructor with no argument to
prevent serialization exceptions
* putIfAbsent has been re-set to the method ISPNCacheWorkspaceStorageCache.addChildNodes
to prevent TestISPNCacheWorkspaceStorageCacheInClusterMode to fail
* JGroups and ISPN have been upgraded in the pom files
* jboss-logging-spi has been excluded in case of ISPN to prevent conflicts with the latest
version
* JBossStandaloneJTAManagerLookup has been rewritten to prevent issues due to the loading
order (more info in the class
org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup)
* Fluent config has been used to prevent compilation warnings
* Adapted the config files to ISPN 5 : Correct version has been set to the config files
header, replication timeout has been set explicitly to prevent warnings, wakeUpInterval
has been moved from eviction to expiration and the new transactionManagerLookupClass has
been set
* TestISPNCacheWorkspaceStorageCache and TestJBossCacheWorkspaceStorageCache have been
moved to org.exoplatform.services.jcr.impl.dataflow.persistent.infinispan and to
org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache to be easily excluded
since they fail due to their conflict dependencies
Modified: jcr/trunk/applications/exo.jcr.applications.config/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.config/pom.xml 2011-08-09 14:05:16 UTC
(rev 4720)
+++ jcr/trunk/applications/exo.jcr.applications.config/pom.xml 2011-08-09 14:08:31 UTC
(rev 4721)
@@ -92,7 +92,7 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.11.1.Final</version>
+ <version>2.12.1.3.Final</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
@@ -101,6 +101,18 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-jdbc</artifactId>
- </dependency>
+ </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>
</project>
Modified: jcr/trunk/applications/exo.jcr.ear/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.ear/pom.xml 2011-08-09 14:05:16 UTC (rev 4720)
+++ jcr/trunk/applications/exo.jcr.ear/pom.xml 2011-08-09 14:08:31 UTC (rev 4721)
@@ -115,7 +115,7 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.11.1.Final</version>
+ <version>2.12.1.3.Final</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
@@ -124,7 +124,19 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-jdbc</artifactId>
- </dependency>
+ </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>
<build>
<finalName>exo-jcr-ear</finalName>
Modified: jcr/trunk/applications/product-patches/as/jboss/exo-configuration.xml
===================================================================
--- jcr/trunk/applications/product-patches/as/jboss/exo-configuration.xml 2011-08-09
14:05:16 UTC (rev 4720)
+++ jcr/trunk/applications/product-patches/as/jboss/exo-configuration.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -195,7 +195,7 @@
</component>
<component profiles="ispn">
<key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
-
<type>org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
</component>
<component profiles="ispn">
Modified: jcr/trunk/applications/product-patches/as/jetty/exo-configuration.xml
===================================================================
--- jcr/trunk/applications/product-patches/as/jetty/exo-configuration.xml 2011-08-09
14:05:16 UTC (rev 4720)
+++ jcr/trunk/applications/product-patches/as/jetty/exo-configuration.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -195,7 +195,7 @@
</component>
<component profiles="ispn">
<key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
-
<type>org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
</component>
<component profiles="ispn">
Modified: jcr/trunk/applications/product-patches/as/jonas/exo-configuration.xml
===================================================================
--- jcr/trunk/applications/product-patches/as/jonas/exo-configuration.xml 2011-08-09
14:05:16 UTC (rev 4720)
+++ jcr/trunk/applications/product-patches/as/jonas/exo-configuration.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -195,7 +195,7 @@
</component>
<component profiles="ispn">
<key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
-
<type>org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
</component>
<component profiles="ispn">
Modified: jcr/trunk/applications/product-patches/as/tomcat/exo-configuration.xml
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/exo-configuration.xml 2011-08-09
14:05:16 UTC (rev 4720)
+++ jcr/trunk/applications/product-patches/as/tomcat/exo-configuration.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -211,7 +211,7 @@
</component>
<component profiles="ispn">
<key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
-
<type>org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
</component>
<component profiles="ispn">
Modified: jcr/trunk/exo.jcr.component.core/pom.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/pom.xml 2011-08-09 14:05:16 UTC (rev 4720)
+++ jcr/trunk/exo.jcr.component.core/pom.xml 2011-08-09 14:08:31 UTC (rev 4721)
@@ -853,8 +853,20 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.11.1.Final</version>
+ <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>
@@ -868,8 +880,20 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.11.1.Final</version>
+ <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>
@@ -883,8 +907,20 @@
<dependency>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.11.1.Final</version>
+ <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>
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -463,7 +463,7 @@
* @param systemDataContainerHolder
* System Workspace data container (persistent level)
*/
- protected CacheableWorkspaceDataManager(WorkspaceDataContainer dataContainer,
WorkspaceStorageCache cache,
+ public CacheableWorkspaceDataManager(WorkspaceDataContainer dataContainer,
WorkspaceStorageCache cache,
SystemDataContainerHolder systemDataContainerHolder)
{
this(dataContainer, cache, systemDataContainerHolder, null, (RPCService)null);
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/BufferedISPNCache.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -29,7 +29,7 @@
import org.infinispan.config.Configuration.CacheMode;
import org.infinispan.context.Flag;
import org.infinispan.lifecycle.ComponentStatus;
-import org.infinispan.manager.CacheContainer;
+import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.util.concurrent.NotifyingFuture;
import java.security.PrivilegedAction;
@@ -514,7 +514,7 @@
/**
* {@inheritDoc}
*/
- public CacheContainer getCacheManager()
+ public EmbeddedCacheManager getCacheManager()
{
return parentCache.getCacheManager();
}
@@ -1007,6 +1007,14 @@
}
/**
+ * {@inheritDoc}
+ */
+ public NotifyingFuture<Object> getAsync(CacheKey key)
+ {
+ return parentCache.getAsync(key);
+ }
+
+ /**
* Start buffering process.
*/
public void beginTransaction()
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -27,7 +27,7 @@
public class CacheId extends CacheKey
{
- CacheId()
+ public CacheId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesByPageId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -25,7 +25,7 @@
public class CacheNodesByPageId extends CacheKey
{
- CacheNodesByPageId()
+ public CacheNodesByPageId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheNodesId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -31,7 +31,7 @@
public class CacheNodesId extends CacheKey
{
- CacheNodesId()
+ public CacheNodesId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternNodesId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -27,7 +27,7 @@
public class CachePatternNodesId extends CacheKey
{
- CachePatternNodesId()
+ public CachePatternNodesId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePatternPropsId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -27,7 +27,7 @@
public class CachePatternPropsId extends CacheKey
{
- CachePatternPropsId()
+ public CachePatternPropsId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CachePropsId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -31,7 +31,7 @@
public class CachePropsId extends CacheKey
{
- CachePropsId()
+ public CachePropsId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheQPath.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -35,7 +35,7 @@
*/
class CacheQPath extends CacheKey
{
- CacheQPath()
+ public CacheQPath()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/CacheRefsId.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -30,7 +30,7 @@
*/
public class CacheRefsId extends CacheKey
{
- CacheRefsId()
+ public CacheRefsId()
{
super();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -662,12 +662,12 @@
putNode(child, ModifyChildOption.NOT_MODIFY);
set.add(child.getIdentifier());
}
- cache.put(new CacheNodesId(parent.getIdentifier()), set);
+ cache.putIfAbsent(new CacheNodesId(parent.getIdentifier()), set);
}
else
{
// cache fact of empty childs list
- cache.put(new CacheNodesId(parent.getIdentifier()), new
HashSet<Object>());
+ cache.putIfAbsent(new CacheNodesId(parent.getIdentifier()), new
HashSet<Object>());
}
}
finally
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -215,10 +215,10 @@
GlobalConfiguration gc = manager.getGlobalConfiguration();
ExoContainer container = ExoContainerContext.getCurrentContainer();
// Ensure that the cluster name won't be used between 2 ExoContainers
- gc.setClusterName(gc.getClusterName() + "_" +
container.getContext().getName());
- gc.setCacheManagerName(gc.getCacheManagerName() + "_" +
container.getContext().getName());
+ gc.fluent().transport().clusterName(gc.getClusterName() + "_" +
container.getContext().getName())
+ .globalJmxStatistics().cacheManagerName(gc.getCacheManagerName() + "_"
+ container.getContext().getName()).
// Configure the MBeanServerLookup
- gc.setMBeanServerLookupInstance(MBEAN_SERVER_LOOKUP);
+ mBeanServerLookup(MBEAN_SERVER_LOOKUP);
Configuration conf = manager.getDefaultConfiguration();
if (CACHE_MANAGERS.containsKey(gc))
{
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java
(rev 0)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/infinispan/JBossStandaloneJTAManagerLookup.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -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@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.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);
+ }
+}
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-data.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -43,12 +43,13 @@
<default>
<clustering mode="replication">
<stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
- <sync />
+ <sync replTimeout="20000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
- <eviction strategy="LRU" wakeUpInterval="5000"
threadPolicy="DEFAULT" maxEntries="1000000"/>
+ <eviction strategy="LRU" threadPolicy="DEFAULT"
maxEntries="1000000"/>
+ <expiration wakeUpInterval="5000"/>
</default>
</infinispan>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-indexer.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -43,11 +43,11 @@
<default>
<clustering mode="replication">
<stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
- <sync />
+ <sync replTimeout="20000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
<eviction strategy="NONE"/>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/portal/cluster/infinispan-lock.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -43,11 +43,11 @@
<default>
<clustering mode="replication">
<stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
- <sync />
+ <sync replTimeout="20000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
<eviction strategy="NONE"/>
Deleted:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestISPNCacheWorkspaceStorageCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestISPNCacheWorkspaceStorageCache.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestISPNCacheWorkspaceStorageCache.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -1,51 +0,0 @@
-/*
- * 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;
-
-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.infinispan.ISPNCacheWorkspaceStorageCache;
-
-import java.util.ArrayList;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date:
- *
- * @author <a href="karpenko.sergiy(a)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
Deleted:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -1,374 +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.
- */
-package org.exoplatform.services.jcr.impl.dataflow.persistent;
-
-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.ItemState;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
-import org.exoplatform.services.jcr.dataflow.persistent.PersistedNodeData;
-import org.exoplatform.services.jcr.dataflow.persistent.WorkspaceStorageCache;
-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.PropertyData;
-import org.exoplatform.services.jcr.datamodel.QPathEntry;
-import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter;
-import
org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache;
-import org.exoplatform.services.jcr.impl.storage.SystemDataContainerHolder;
-import org.exoplatform.services.jcr.impl.storage.WorkspaceDataContainerBase;
-import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
-import org.exoplatform.services.jcr.storage.WorkspaceStorageConnection;
-import org.exoplatform.services.transaction.TransactionService;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.RepositoryException;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter
Nedonosko</a>
- * @version $Id$
- */
-public class TestJBossCacheWorkspaceStorageCache extends WorkspaceStorageCacheBaseCase
-{
-
- @Override
- public WorkspaceStorageCache getCacheImpl() throws Exception
- {
- TransactionService transactionService =
-
(TransactionService)container.getComponentInstanceOfType(TransactionService.class);
-
- ArrayList<SimpleParameterEntry> list = new
ArrayList<SimpleParameterEntry>();
- list.add(new
SimpleParameterEntry(JBossCacheWorkspaceStorageCache.JBOSSCACHE_CONFIG,
- "jar:/conf/standalone/test-jbosscache-config.xml"));
-
- CacheEntry entry = new CacheEntry(list);
- entry.setEnabled(true);
- WorkspaceEntry workspaceEntry = new WorkspaceEntry();
- workspaceEntry.setUniqueName("WS_UUID");
- workspaceEntry.setCache(entry);
- return new JBossCacheWorkspaceStorageCache(workspaceEntry,
- transactionService == null ? null : transactionService, new
ConfigurationManagerImpl());
- }
-
- public void testRaceConditions() throws Exception
- {
- MyWorkspaceStorageConnection con = new MyWorkspaceStorageConnection();
- WorkspaceDataContainer wdc = new MyWorkspaceDataContainer(con);
- final CacheableWorkspaceDataManager cwdm =
- new CacheableWorkspaceDataManager(wdc, getCacheImpl(), new
SystemDataContainerHolder(wdc));
- String idNode = "foo1";
- executeConcurrentReadNWrite(con, cwdm, Mode.READ_FIRST, idNode);
- assertNotNull(cwdm.getItemData(idNode));
- idNode = "foo2";
- executeConcurrentReadNWrite(con, cwdm, Mode.WRITE_FIRST, idNode);
- assertNotNull(cwdm.getItemData(idNode));
- }
-
- /**
- * @param con
- * @param cwdm
- * @param mode
- * @param idNode
- * @throws InterruptedException
- */
- private void executeConcurrentReadNWrite(MyWorkspaceStorageConnection con, final
CacheableWorkspaceDataManager cwdm,
- final Mode mode, final String idNode) throws InterruptedException
- {
- final CountDownLatch goSignal = con.setMode(mode);
- final AtomicReference<Exception> ex = new
AtomicReference<Exception>();
- final CountDownLatch startSignal = new CountDownLatch(1);
- final CountDownLatch doneSignal = new CountDownLatch(2);
- Thread writer = new Thread()
- {
- public void run()
- {
- try
- {
- startSignal.await();
- PlainChangesLog chlog = new PlainChangesLogImpl();
- chlog.add(ItemState.createAddedState(new PersistedNodeData(idNode,
Constants.ROOT_PATH, "parent-id", 1, 0,
- Constants.NT_UNSTRUCTURED, null, null)));
- cwdm.save(chlog);
- if (mode == Mode.WRITE_FIRST) goSignal.countDown();
- }
- catch (Exception e)
- {
- ex.set(e);
- }
- finally
- {
- doneSignal.countDown();
- }
- }
- };
- writer.start();
- Thread reader = new Thread()
- {
- public void run()
- {
- try
- {
- startSignal.await();
- cwdm.getItemData(idNode);
- if (mode == Mode.READ_FIRST) goSignal.countDown();
- }
- catch (Exception e)
- {
- ex.set(e);
- }
- finally
- {
- doneSignal.countDown();
- }
- }
- };
- reader.start();
- startSignal.countDown();
- doneSignal.await();
- assertNull(ex.get());
- }
-
- private static enum Mode
- {
- READ_FIRST, WRITE_FIRST;
- }
- private static class MyWorkspaceStorageConnection implements
WorkspaceStorageConnection
- {
-
-
- private Mode mode;
- private CountDownLatch goSignal;
-
- public CountDownLatch setMode(Mode mode)
- {
- this.mode = mode;
- this.goSignal = new CountDownLatch(1);
- return goSignal;
- }
-
-
- public void add(NodeData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public void add(PropertyData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public void close() throws IllegalStateException, RepositoryException
- {
- }
-
- public void commit() throws IllegalStateException, RepositoryException
- {
- if (mode == Mode.READ_FIRST)
- {
- try
- {
- goSignal.await();
- }
- catch (InterruptedException e)
- {
- Thread.currentThread().interrupt();
- }
- }
- }
-
- public void delete(NodeData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public void delete(PropertyData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public int getChildNodesCount(NodeData parent) throws RepositoryException
- {
- return -1;
- }
-
- public List<NodeData> getChildNodesData(NodeData parent) throws
RepositoryException, IllegalStateException
- {
- return null;
- }
-
- public List<PropertyData> getChildPropertiesData(NodeData parent) throws
RepositoryException,
- IllegalStateException
- {
- return null;
- }
-
- public List<PropertyData> getChildPropertiesData(NodeData parent,
List<QPathEntryFilter> pattern)
- throws RepositoryException, IllegalStateException
- {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws
RepositoryException,
- IllegalStateException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType
itemType) throws RepositoryException,
- IllegalStateException
- {
- return null;
- }
-
- public ItemData getItemData(String identifier) throws RepositoryException,
IllegalStateException
- {
- if (mode == Mode.WRITE_FIRST)
- {
- try
- {
- goSignal.await();
- }
- catch (InterruptedException e)
- {
- Thread.currentThread().interrupt();
- }
- }
- return null;
- }
-
- public List<PropertyData> getReferencesData(String nodeIdentifier) throws
RepositoryException,
- IllegalStateException, UnsupportedOperationException
- {
- return null;
- }
-
- public boolean isOpened()
- {
- return true;
- }
-
- public List<PropertyData> listChildPropertiesData(NodeData parent) throws
RepositoryException,
- IllegalStateException
- {
- return null;
- }
-
- public void rename(NodeData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public void rollback() throws IllegalStateException, RepositoryException
- {
- }
-
- public void update(NodeData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public void update(PropertyData data) throws RepositoryException,
UnsupportedOperationException,
- InvalidItemStateException, IllegalStateException
- {
- }
-
- public int getLastOrderNumber(NodeData parent) throws RepositoryException
- {
- return -1;
- }
-
- public List<NodeData> getChildNodesData(NodeData parent,
List<QPathEntryFilter> pattern) throws RepositoryException,
- IllegalStateException
- {
- return getChildNodesData(parent);
- }
-
- };
-
- private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
- {
-
- private WorkspaceStorageConnection con;
-
- public MyWorkspaceDataContainer(WorkspaceStorageConnection con)
- {
- this.con = con;
- }
-
- public boolean isCheckSNSNewConnection()
- {
- return false;
- }
-
- public boolean isSame(WorkspaceDataContainer another)
- {
- return false;
- }
-
- public WorkspaceStorageConnection openConnection() throws RepositoryException
- {
- return con;
- }
-
- public WorkspaceStorageConnection openConnection(boolean readOnly) throws
RepositoryException
- {
- return con;
- }
-
- public WorkspaceStorageConnection reuseConnection(WorkspaceStorageConnection
original) throws RepositoryException
- {
- return con;
- }
-
- public String getInfo()
- {
- return "MyWorkspaceDataContainer";
- }
-
- public String getName()
- {
- return "MyWorkspaceDataContainer";
- }
-
- public String getStorageVersion()
- {
- return "0";
- }
-
- public String getUniqueName()
- {
- return "MyWorkspaceDataContainer";
- }
- };
-
-}
Copied:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TestISPNCacheWorkspaceStorageCache.java
(from rev 4697,
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestISPNCacheWorkspaceStorageCache.java)
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TestISPNCacheWorkspaceStorageCache.java
(rev 0)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/TestISPNCacheWorkspaceStorageCache.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -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.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.infinispan.ISPNCacheWorkspaceStorageCache;
+import
org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.TestJBossCacheWorkspaceStorageCache;
+
+import java.util.ArrayList;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)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
Copied:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCache.java
(from rev 4697,
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java)
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCache.java
(rev 0)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2011-08-09
14:08:31 UTC (rev 4721)
@@ -0,0 +1,376 @@
+/*
+ * 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.jbosscache;
+
+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.ItemState;
+import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
+import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
+import org.exoplatform.services.jcr.dataflow.persistent.PersistedNodeData;
+import org.exoplatform.services.jcr.dataflow.persistent.WorkspaceStorageCache;
+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.PropertyData;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
+import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter;
+import
org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager;
+import
org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspaceStorageCacheBaseCase;
+import
org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache;
+import org.exoplatform.services.jcr.impl.storage.SystemDataContainerHolder;
+import org.exoplatform.services.jcr.impl.storage.WorkspaceDataContainerBase;
+import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
+import org.exoplatform.services.jcr.storage.WorkspaceStorageConnection;
+import org.exoplatform.services.transaction.TransactionService;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.RepositoryException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter
Nedonosko</a>
+ * @version $Id$
+ */
+public class TestJBossCacheWorkspaceStorageCache extends WorkspaceStorageCacheBaseCase
+{
+
+ @Override
+ public WorkspaceStorageCache getCacheImpl() throws Exception
+ {
+ TransactionService transactionService =
+
(TransactionService)container.getComponentInstanceOfType(TransactionService.class);
+
+ ArrayList<SimpleParameterEntry> list = new
ArrayList<SimpleParameterEntry>();
+ list.add(new
SimpleParameterEntry(JBossCacheWorkspaceStorageCache.JBOSSCACHE_CONFIG,
+ "jar:/conf/standalone/test-jbosscache-config.xml"));
+
+ CacheEntry entry = new CacheEntry(list);
+ entry.setEnabled(true);
+ WorkspaceEntry workspaceEntry = new WorkspaceEntry();
+ workspaceEntry.setUniqueName("WS_UUID");
+ workspaceEntry.setCache(entry);
+ return new JBossCacheWorkspaceStorageCache(workspaceEntry,
+ transactionService == null ? null : transactionService, new
ConfigurationManagerImpl());
+ }
+
+ public void testRaceConditions() throws Exception
+ {
+ MyWorkspaceStorageConnection con = new MyWorkspaceStorageConnection();
+ WorkspaceDataContainer wdc = new MyWorkspaceDataContainer(con);
+ final CacheableWorkspaceDataManager cwdm =
+ new CacheableWorkspaceDataManager(wdc, getCacheImpl(), new
SystemDataContainerHolder(wdc));
+ String idNode = "foo1";
+ executeConcurrentReadNWrite(con, cwdm, Mode.READ_FIRST, idNode);
+ assertNotNull(cwdm.getItemData(idNode));
+ idNode = "foo2";
+ executeConcurrentReadNWrite(con, cwdm, Mode.WRITE_FIRST, idNode);
+ assertNotNull(cwdm.getItemData(idNode));
+ }
+
+ /**
+ * @param con
+ * @param cwdm
+ * @param mode
+ * @param idNode
+ * @throws InterruptedException
+ */
+ private void executeConcurrentReadNWrite(MyWorkspaceStorageConnection con, final
CacheableWorkspaceDataManager cwdm,
+ final Mode mode, final String idNode) throws InterruptedException
+ {
+ final CountDownLatch goSignal = con.setMode(mode);
+ final AtomicReference<Exception> ex = new
AtomicReference<Exception>();
+ final CountDownLatch startSignal = new CountDownLatch(1);
+ final CountDownLatch doneSignal = new CountDownLatch(2);
+ Thread writer = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ startSignal.await();
+ PlainChangesLog chlog = new PlainChangesLogImpl();
+ chlog.add(ItemState.createAddedState(new PersistedNodeData(idNode,
Constants.ROOT_PATH, "parent-id", 1, 0,
+ Constants.NT_UNSTRUCTURED, null, null)));
+ cwdm.save(chlog);
+ if (mode == Mode.WRITE_FIRST) goSignal.countDown();
+ }
+ catch (Exception e)
+ {
+ ex.set(e);
+ }
+ finally
+ {
+ doneSignal.countDown();
+ }
+ }
+ };
+ writer.start();
+ Thread reader = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ startSignal.await();
+ cwdm.getItemData(idNode);
+ if (mode == Mode.READ_FIRST) goSignal.countDown();
+ }
+ catch (Exception e)
+ {
+ ex.set(e);
+ }
+ finally
+ {
+ doneSignal.countDown();
+ }
+ }
+ };
+ reader.start();
+ startSignal.countDown();
+ doneSignal.await();
+ assertNull(ex.get());
+ }
+
+ private static enum Mode
+ {
+ READ_FIRST, WRITE_FIRST;
+ }
+ private static class MyWorkspaceStorageConnection implements
WorkspaceStorageConnection
+ {
+
+
+ private Mode mode;
+ private CountDownLatch goSignal;
+
+ public CountDownLatch setMode(Mode mode)
+ {
+ this.mode = mode;
+ this.goSignal = new CountDownLatch(1);
+ return goSignal;
+ }
+
+
+ public void add(NodeData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public void add(PropertyData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public void close() throws IllegalStateException, RepositoryException
+ {
+ }
+
+ public void commit() throws IllegalStateException, RepositoryException
+ {
+ if (mode == Mode.READ_FIRST)
+ {
+ try
+ {
+ goSignal.await();
+ }
+ catch (InterruptedException e)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+
+ public void delete(NodeData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public void delete(PropertyData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public int getChildNodesCount(NodeData parent) throws RepositoryException
+ {
+ return -1;
+ }
+
+ public List<NodeData> getChildNodesData(NodeData parent) throws
RepositoryException, IllegalStateException
+ {
+ return null;
+ }
+
+ public List<PropertyData> getChildPropertiesData(NodeData parent) throws
RepositoryException,
+ IllegalStateException
+ {
+ return null;
+ }
+
+ public List<PropertyData> getChildPropertiesData(NodeData parent,
List<QPathEntryFilter> pattern)
+ throws RepositoryException, IllegalStateException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ItemData getItemData(NodeData parentData, QPathEntry name) throws
RepositoryException,
+ IllegalStateException
+ {
+ return getItemData(parentData, name, ItemType.UNKNOWN);
+ }
+
+ public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType
itemType) throws RepositoryException,
+ IllegalStateException
+ {
+ return null;
+ }
+
+ public ItemData getItemData(String identifier) throws RepositoryException,
IllegalStateException
+ {
+ if (mode == Mode.WRITE_FIRST)
+ {
+ try
+ {
+ goSignal.await();
+ }
+ catch (InterruptedException e)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+ return null;
+ }
+
+ public List<PropertyData> getReferencesData(String nodeIdentifier) throws
RepositoryException,
+ IllegalStateException, UnsupportedOperationException
+ {
+ return null;
+ }
+
+ public boolean isOpened()
+ {
+ return true;
+ }
+
+ public List<PropertyData> listChildPropertiesData(NodeData parent) throws
RepositoryException,
+ IllegalStateException
+ {
+ return null;
+ }
+
+ public void rename(NodeData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public void rollback() throws IllegalStateException, RepositoryException
+ {
+ }
+
+ public void update(NodeData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public void update(PropertyData data) throws RepositoryException,
UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+ {
+ }
+
+ public int getLastOrderNumber(NodeData parent) throws RepositoryException
+ {
+ return -1;
+ }
+
+ public List<NodeData> getChildNodesData(NodeData parent,
List<QPathEntryFilter> pattern) throws RepositoryException,
+ IllegalStateException
+ {
+ return getChildNodesData(parent);
+ }
+
+ };
+
+ private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
+ {
+
+ private WorkspaceStorageConnection con;
+
+ public MyWorkspaceDataContainer(WorkspaceStorageConnection con)
+ {
+ this.con = con;
+ }
+
+ public boolean isCheckSNSNewConnection()
+ {
+ return false;
+ }
+
+ public boolean isSame(WorkspaceDataContainer another)
+ {
+ return false;
+ }
+
+ public WorkspaceStorageConnection openConnection() throws RepositoryException
+ {
+ return con;
+ }
+
+ public WorkspaceStorageConnection openConnection(boolean readOnly) throws
RepositoryException
+ {
+ return con;
+ }
+
+ public WorkspaceStorageConnection reuseConnection(WorkspaceStorageConnection
original) throws RepositoryException
+ {
+ return con;
+ }
+
+ public String getInfo()
+ {
+ return "MyWorkspaceDataContainer";
+ }
+
+ public String getName()
+ {
+ return "MyWorkspaceDataContainer";
+ }
+
+ public String getStorageVersion()
+ {
+ return "0";
+ }
+
+ public String getUniqueName()
+ {
+ return "MyWorkspaceDataContainer";
+ }
+ };
+
+}
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -200,13 +200,13 @@
</component>
<component>
- <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
-
<type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
+ <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.jbosscache.JBossTransactionsService</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
<init-params>
<value-param>
<name>timeout</name>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-config.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -43,12 +43,13 @@
<default>
<clustering mode="replication">
<stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
- <sync />
+ <sync replTimeout="20000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
- <eviction strategy="LRU" wakeUpInterval="5000"
threadPolicy="DEFAULT" maxEntries="1000000"/>
+ <eviction strategy="LRU" threadPolicy="DEFAULT"
maxEntries="1000000"/>
+ <expiration wakeUpInterval="5000"/>
</default>
</infinispan>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-indexer.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -43,11 +43,11 @@
<default>
<clustering mode="replication">
<stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
- <sync />
+ <sync replTimeout="20000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
<eviction strategy="NONE"/>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-infinispan-lock.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -43,11 +43,11 @@
<default>
<clustering mode="replication">
<stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
- <sync />
+ <sync replTimeout="20000"/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
<eviction strategy="NONE"/>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -200,13 +200,13 @@
</component>
<component>
- <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
-
<type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
+ <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.jbosscache.JBossTransactionsService</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
<init-params>
<value-param>
<name>timeout</name>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -200,13 +200,13 @@
</component>
<component>
- <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
-
<type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
+ <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.jbosscache.JBossTransactionsService</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
<init-params>
<value-param>
<name>timeout</name>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-config.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -36,8 +36,9 @@
<default>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
- <eviction strategy="LRU" wakeUpInterval="5000"
threadPolicy="DEFAULT" maxEntries="1000000"/>
+ <eviction strategy="LRU" threadPolicy="DEFAULT"
maxEntries="1000000"/>
+ <expiration wakeUpInterval="5000"/>
</default>
</infinispan>
Modified:
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-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan-lock.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -21,8 +21,8 @@
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:infinispan:config:4.1
http://www.infinispan.org/schemas/infinispan-config-4.1.xsd"
- xmlns="urn:infinispan:config:4.1">
+ 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">
@@ -36,7 +36,7 @@
<default>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="20000" writeSkewCheck="false"
concurrencyLevel="500" useLockStriping="false"/>
- <transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <transaction
transactionManagerLookupClass="org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="true"/>
<eviction strategy="NONE"/>
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/transaction-service.xml
===================================================================
---
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/transaction-service.xml 2011-08-09
14:05:16 UTC (rev 4720)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/transaction-service.xml 2011-08-09
14:08:31 UTC (rev 4721)
@@ -190,7 +190,7 @@
<programlisting> <!-- Configuration of the TransactionManagerLookup
-->
<component>
<key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
-
<type>org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup</type>
+
<type>org.exoplatform.services.transaction.infinispan.JBossStandaloneJTAManagerLookup</type>
</component>
<!-- Configuration of the TransactionService -->
<component>
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2011-08-09 14:05:16 UTC (rev 4720)
+++ jcr/trunk/pom.xml 2011-08-09 14:08:31 UTC (rev 4721)
@@ -392,12 +392,12 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>4.2.1.FINAL</version>
+ <version>5.0.0.FINAL</version>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-jdbc</artifactId>
- <version>4.2.1.FINAL</version>
+ <version>5.0.0.FINAL</version>
</dependency>
</dependencies>
</dependencyManagement>