[exo-jcr-commits] exo-jcr SVN: r5545 - in kernel/trunk: exo.kernel.component.ext.cache.impl.infinispan.v5 and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 31 10:51:04 EST 2012


Author: nfilotto
Date: 2012-01-31 10:51:04 -0500 (Tue, 31 Jan 2012)
New Revision: 5545

Modified:
   kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml
   kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java
   kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java
   kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml
   kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml
   kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
   kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml
   kernel/trunk/pom.xml
Log:
EXOJCR-1682: Upgrade to ISPN 5.1.0.FINAL and JGroups 3.0.3.Final (kernel)

Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/pom.xml	2012-01-31 15:51:04 UTC (rev 5545)
@@ -34,7 +34,7 @@
 		<dependency>
 			<groupId>org.jgroups</groupId>
 			<artifactId>jgroups</artifactId>
-			<version>3.0.2.Final</version>
+			<version>3.0.3.Final</version>
 		</dependency>
 		<dependency>
 			<groupId>org.slf4j</groupId>

Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java	2012-01-31 15:51:04 UTC (rev 5545)
@@ -41,12 +41,9 @@
 import org.infinispan.configuration.global.GlobalConfigurationBuilder;
 import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
 import org.infinispan.configuration.parsing.Parser;
-import org.infinispan.distribution.ch.ConsistentHash;
-import org.infinispan.distribution.ch.DefaultConsistentHash;
 import org.infinispan.eviction.EvictionStrategy;
 import org.infinispan.jmx.MBeanServerLookup;
 import org.infinispan.manager.DefaultCacheManager;
-import org.infinispan.util.Util;
 
 import java.io.InputStream;
 import java.io.Serializable;
@@ -55,6 +52,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.Callable;
@@ -168,9 +166,6 @@
       }
       // Initialize the main cache manager
       this.cacheManager = initCacheManager(cacheConfigTemplate);
-      // Register the main cache manager
-      mappingGlobalConfigCacheManager.put(cacheManager.getCacheManagerConfiguration().transport().clusterName(),
-         cacheManager);
    }
 
    /**
@@ -216,10 +211,11 @@
                   throw new ExoCacheInitException("Cannot parse the configuration '" + cacheConfigTemplate + "'", e);
                }
                configureCacheManager(configBuilder);
+               DefaultCacheManager cacheManager;
                try
                {
                   // Create the CacheManager from the new configuration
-                  return new DefaultCacheManager(configBuilder.build(), config);
+                  cacheManager = new DefaultCacheManager(configBuilder.build(), config);
                }
                catch (RuntimeException e) //NOSONAR
                {
@@ -227,6 +223,10 @@
                      "Cannot initialize the CacheManager corresponding to the configuration '" + cacheConfigTemplate
                         + "'", e);
                }
+               // Register the main cache manager
+               mappingGlobalConfigCacheManager.put(cacheManager.getCacheManagerConfiguration().transport().clusterName(),
+                  cacheManager);
+               return cacheManager;
             }
          });
       }
@@ -344,10 +344,9 @@
                            currentCacheManager =
                               new DefaultCacheManager(configBuilder.build(), holder.getDefaultConfigurationBuilder()
                                  .build(), false);
-                           for (ConfigurationBuilder b : holder.getConfigurationBuilders())
+                           for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet())
                            {
-                              Configuration c = b.build();
-                              currentCacheManager.defineConfiguration(c.name(), c);
+                              currentCacheManager.defineConfiguration(entry.getKey(), entry.getValue().build());
                            }
                            currentCacheManager.start();
                            // We register this new cache manager
@@ -370,15 +369,6 @@
                }
             }
             confBuilder.read(cacheManager.getDefaultCacheConfiguration());
-            //TODO remove it once ISPN-1687 will be fixed
-            confBuilder.storeAsBinary().enabled(false);
-            //TODO remove it once ISPN-1689 will be fixed
-            confBuilder
-               .clustering()
-               .hash()
-               .consistentHash(
-                  Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
-                     .getContextClassLoader()));
          }
          else if (config.isDistributed())
          {
@@ -399,15 +389,6 @@
             if (LOG.isInfoEnabled())
                LOG.info("The configuration template will be used for the the cache '" + region + "'.");
             confBuilder.read(cacheManager.getDefaultCacheConfiguration());
-            //TODO remove it once ISPN-1687 will be fixed
-            confBuilder.storeAsBinary().enabled(false);
-            //TODO remove it once ISPN-1689 will be fixed
-            confBuilder
-               .clustering()
-               .hash()
-               .consistentHash(
-                  Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
-                     .getContextClassLoader()));
             if (!config.isRepicated())
             {
                // The cache is local

Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/java/org/exoplatform/services/ispn/DistributedCacheManager.java	2012-01-31 15:51:04 UTC (rev 5545)
@@ -29,21 +29,18 @@
 import org.exoplatform.services.log.Log;
 import org.exoplatform.services.transaction.TransactionService;
 import org.infinispan.Cache;
-import org.infinispan.configuration.cache.Configuration;
 import org.infinispan.configuration.cache.ConfigurationBuilder;
 import org.infinispan.configuration.global.GlobalConfigurationBuilder;
 import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
 import org.infinispan.configuration.parsing.Parser;
-import org.infinispan.distribution.ch.ConsistentHash;
-import org.infinispan.distribution.ch.DefaultConsistentHash;
 import org.infinispan.manager.DefaultCacheManager;
 import org.infinispan.manager.EmbeddedCacheManager;
 import org.infinispan.transaction.lookup.TransactionManagerLookup;
-import org.infinispan.util.Util;
 import org.picocontainer.Startable;
 
 import java.security.PrivilegedExceptionAction;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import javax.transaction.TransactionManager;
 
@@ -143,8 +140,7 @@
             LOG.debug("The configuration file of the DistributedCacheManager will be loaded from " + configurationFile);
          }
          final TemplateConfigurationHelper helper =
-            new TemplateConfigurationHelper(new String[]{"^jgroups-configuration", "^infinispan-.*"},
-               new String[]{"^infinispan-configuration"}, configManager);
+            new TemplateConfigurationHelper(new String[]{"^.*"}, new String[]{}, configManager);
          if (LOG.isDebugEnabled() && parameters != null && !parameters.isEmpty())
          {
             LOG.debug("The parameters to use while processing the configuration file are " + parameters);
@@ -168,21 +164,15 @@
                      return tm;
                   }
                };
-               for (ConfigurationBuilder b : holder.getConfigurationBuilders())
+               for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet())
                {
+                  ConfigurationBuilder b = entry.getValue();
                   if (tm != null)
                   {
-                     b.transaction().transactionManagerLookup(tml);                     
+                     b.transaction().transactionManagerLookup(tml);
                   }
-                  //TODO remove it once ISPN-1689 will be fixed
-                  b.clustering()
-                     .hash()
-                     .consistentHash(
-                        Util.<ConsistentHash> getInstance(DefaultConsistentHash.class.getName(), Thread.currentThread()
-                           .getContextClassLoader()));
-                  Configuration c = b.build();
-                  manager.defineConfiguration(c.name(), c);
-                  manager.getCache(c.name());
+                  manager.defineConfiguration(entry.getKey(), b.build());
+                  manager.getCache(entry.getKey());
                }
                return manager;
             }
@@ -190,8 +180,8 @@
       }
       catch (Exception e)//NOSONAR
       {
-         throw new IllegalStateException("Could not initialize the cache manager corresponding to the configuration file "
-            + configurationFile, e);
+         throw new IllegalStateException(
+            "Could not initialize the cache manager corresponding to the configuration file " + configurationFile, e);
       }
    }
 

Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/main/resources/conf/portal/cache-configuration-template.xml	2012-01-31 15:51:04 UTC (rev 5545)
@@ -58,7 +58,7 @@
       <jmxStatistics enabled="true"/>
       <invocationBatching enabled="true"/>
       <clustering mode="replication">
-         <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+         <stateTransfer timeout="20000" fetchInMemoryState="false"/>
          <sync replTimeout="20000"/>
       </clustering>
    </default>

Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/cache-configuration-template.xml	2012-01-31 15:51:04 UTC (rev 5545)
@@ -57,7 +57,7 @@
       <transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" transactionMode="TRANSACTIONAL"/>
       <jmxStatistics enabled="true"/>
       <clustering mode="replication">
-         <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+         <stateTransfer timeout="20000" fetchInMemoryState="false"/>
          <sync replTimeout="20000"/>
       </clustering>
       <invocationBatching enabled="true"/> 

Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v5/src/test/resources/conf/portal/distributed-cache-configuration-template.xml	2012-01-31 15:51:04 UTC (rev 5545)
@@ -57,7 +57,7 @@
       <transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" syncRollbackPhase="true" syncCommitPhase="true" transactionMode="TRANSACTIONAL"/>
       <jmxStatistics enabled="true"/>
       <clustering mode="replication">
-         <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+         <stateTransfer timeout="20000" fetchInMemoryState="false"/>
          <sync replTimeout="20000"/>
       </clustering>
       <invocationBatching enabled="true"/> 

Modified: kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/exo.kernel.component.ext.rpc.impl.jgroups.v3/pom.xml	2012-01-31 15:51:04 UTC (rev 5545)
@@ -40,7 +40,7 @@
       <dependency>
          <groupId>org.jgroups</groupId>
          <artifactId>jgroups</artifactId>
-         <version>3.0.2.Final</version>
+         <version>3.0.3.Final</version>
       </dependency>
       <dependency>
          <groupId>org.slf4j</groupId>

Modified: kernel/trunk/pom.xml
===================================================================
--- kernel/trunk/pom.xml	2012-01-31 14:11:05 UTC (rev 5544)
+++ kernel/trunk/pom.xml	2012-01-31 15:51:04 UTC (rev 5545)
@@ -213,7 +213,7 @@
          <dependency>
             <groupId>org.infinispan</groupId>
             <artifactId>infinispan-core</artifactId>
-            <version>5.1.0.CR3</version>
+            <version>5.1.0.FINAL</version>
          </dependency>
          <dependency>
             <groupId>org.jibx</groupId>



More information about the exo-jcr-commits mailing list