[exo-jcr-commits] exo-jcr SVN: r1059 - in kernel/branches/config-branch: exo.kernel.commons and 37 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 15 08:36:22 EST 2009


Author: julien_viet
Date: 2009-12-15 08:36:16 -0500 (Tue, 15 Dec 2009)
New Revision: 1059

Added:
   kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheFactory.java
   kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheInitException.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml
Removed:
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
   kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml
Modified:
   kernel/branches/config-branch/exo.kernel.commons/pom.xml
   kernel/branches/config-branch/exo.kernel.component.cache/pom.xml
   kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheConfig.java
   kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExpireKeyStartWithSelector.java
   kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/CacheServiceImpl.java
   kernel/branches/config-branch/exo.kernel.component.command/pom.xml
   kernel/branches/config-branch/exo.kernel.component.common/pom.xml
   kernel/branches/config-branch/exo.kernel.component.remote/pom.xml
   kernel/branches/config-branch/exo.kernel.container/pom.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/client/http/ClientTypeMap.java
   kernel/branches/config-branch/packaging/module/pom.xml
   kernel/branches/config-branch/pom.xml
Log:
merge up to trunk revision 1056


Modified: kernel/branches/config-branch/exo.kernel.commons/pom.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.commons/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.commons/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,7 +25,7 @@
    <parent>
       <groupId>org.exoplatform.kernel</groupId>
       <artifactId>kernel-parent</artifactId>
-      <version>2.2.0-Beta04</version>
+      <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <artifactId>exo.kernel.commons</artifactId>

Modified: kernel/branches/config-branch/exo.kernel.component.cache/pom.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.cache/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.cache/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,7 +25,7 @@
    <parent>
       <groupId>org.exoplatform.kernel</groupId>
       <artifactId>kernel-parent</artifactId>
-      <version>2.2.0-Beta04</version>
+      <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <artifactId>exo.kernel.component.cache</artifactId>

Modified: kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheConfig.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheConfig.java	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -19,27 +19,54 @@
 package org.exoplatform.services.cache;
 
 /**
+ * This class defines the main configuration properties of an {@link org.exoplatform.services.cache.ExoCache}
+ * 
  * @author Tuan Nguyen (tuan08 at users.sourceforge.net)
  * @since Feb 20, 2005
  * @version $Id: ExoCacheConfig.java 5799 2006-05-28 17:55:42Z geaz $
  */
-public class ExoCacheConfig
+public class ExoCacheConfig implements Cloneable
 {
+   /**
+    * The name of the cache.
+    */
    private String name;
 
+   /**
+    * The label of the cache.
+    */
    private String label;
 
+   /**
+    * The maximum numbers of elements in cache.
+    */
    private int maxSize;
 
+   /**
+    * The amount of time (in milliseconds) an element is not written or
+    * read before it is evicted.
+    */
    private long liveTime;
 
-   private boolean distributed = false;
+   /**
+    * Indicates if the cache is distributed
+    */
+   private boolean distributed;
 
-   private boolean replicated = false;
+   /**
+    * Indicates if the cache is replicated
+    */
+   private boolean replicated;
 
+   /**
+    * The full qualified name of the cache implementation to use
+    */
    private String implementation;
 
-   private boolean logEnabled = false;
+   /**
+    * Indicates if the log is enabled
+    */
+   private boolean logEnabled;
 
    public String getName()
    {
@@ -91,8 +118,6 @@
       distributed = b;
    }
 
-   // public void setDistributed(String b) { distributed_ = "true".equals(b) ; }
-
    public boolean isRepicated()
    {
       return replicated;
@@ -122,4 +147,20 @@
    {
       this.logEnabled = enableLogging;
    }
+
+   /**
+    * @see java.lang.Object#clone()
+    */
+   @Override
+   public ExoCacheConfig clone() throws CloneNotSupportedException
+   {
+      try
+      {
+         return (ExoCacheConfig)super.clone();
+      }
+      catch (Exception e)
+      {
+         throw new AssertionError();
+      }
+   }
 }

Copied: kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheFactory.java (from rev 1056, kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheFactory.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheFactory.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheFactory.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,39 @@
+/*
+ * 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.cache;
+
+/**
+ * This class allows you to create a new instance of {@link org.exoplatform.services.cache.ExoCache}
+ * 
+ * @author <a href="mailto:dmitry.kataev at exoplatform.com">Dmytro Katayev</a>
+ * @version $Id$
+ *
+ */
+public interface ExoCacheFactory
+{
+
+   /**
+    * Creates a new instance of {@link org.exoplatform.services.cache.ExoCache}
+    * @param config the cache to create
+    * @return the new instance of {@link org.exoplatform.services.cache.ExoCache}
+    * @exception ExoCacheInitException if an exception happens while initializing the cache
+    */
+   public ExoCache createCache(ExoCacheConfig config) throws ExoCacheInitException;
+
+}

Copied: kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheInitException.java (from rev 1056, kernel/trunk/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheInitException.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheInitException.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExoCacheInitException.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,61 @@
+/*
+ * 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.cache;
+
+/**
+ * An exception that represents any type of exception that prevent the initialization of
+ * the {@link org.exoplatform.services.cache.ExoCache}
+ * 
+ * @author <a href="mailto:dmitry.kataev at exoplatform.com">Dmytro Katayev</a>
+ * @version $Id$
+ *
+ */
+public class ExoCacheInitException extends Exception
+{
+
+   /**
+    * The serial version UID
+    */
+   private static final long serialVersionUID = -5612051266167302943L;
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCacheInitException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCacheInitException(Throwable cause)
+   {
+      super(cause);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCacheInitException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+}

Modified: kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExpireKeyStartWithSelector.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExpireKeyStartWithSelector.java	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/ExpireKeyStartWithSelector.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -42,7 +42,7 @@
       return false;
    }
 
-   public void onSelect(ExoCache<? extends K, ? extends V> cache, K key, ObjectCacheInfo<? extends V> ocinfo)
+   public void onSelect(ExoCache<? extends K, ? extends V> cache, K key, ObjectCacheInfo<? extends V> ocinfo) throws Exception
    {
       cache.remove(key);
    }

Modified: kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/CacheServiceImpl.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/CacheServiceImpl.java	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.cache/src/main/java/org/exoplatform/services/cache/impl/CacheServiceImpl.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,6 +25,8 @@
 import org.exoplatform.services.cache.ExoCache;
 import org.exoplatform.services.cache.ExoCacheConfig;
 import org.exoplatform.services.cache.ExoCacheConfigPlugin;
+import org.exoplatform.services.cache.ExoCacheFactory;
+import org.exoplatform.services.cache.ExoCacheInitException;
 import org.exoplatform.services.cache.SimpleExoCache;
 
 import java.io.Serializable;
@@ -40,19 +42,29 @@
 @ManagedBy(CacheServiceManaged.class)
 public class CacheServiceImpl implements CacheService
 {
-   private HashMap<String, ExoCacheConfig> configs_ = new HashMap<String, ExoCacheConfig>();
+   private final HashMap<String, ExoCacheConfig> configs_ = new HashMap<String, ExoCacheConfig>();
 
    private final ConcurrentHashMap<String, ExoCache<? extends Serializable, ?>> cacheMap_ =
       new ConcurrentHashMap<String, ExoCache<? extends Serializable, ?>>();
 
-   private ExoCacheConfig defaultConfig_;
+   private final ExoCacheConfig defaultConfig_;
 
-   private LoggingCacheListener loggingListener_;
+   private final LoggingCacheListener loggingListener_;
 
+   private final ExoCacheFactory factory_;
+
    CacheServiceManaged managed;
 
+   /**
+    * 
+    */
    public CacheServiceImpl(InitParams params) throws Exception
    {
+      this(params, null);
+   }
+
+   public CacheServiceImpl(InitParams params, ExoCacheFactory factory) throws Exception
+   {
       List<ExoCacheConfig> configs = params.getObjectParamValues(ExoCacheConfig.class);
       for (ExoCacheConfig config : configs)
       {
@@ -60,6 +72,7 @@
       }
       defaultConfig_ = configs_.get("default");
       loggingListener_ = new LoggingCacheListener();
+      factory_ = factory == null ? new SimpleExoCacheFactory() : factory;
    }
 
    public void addExoCacheConfig(ComponentPlugin plugin)
@@ -111,40 +124,83 @@
       ExoCacheConfig config = configs_.get(region);
       if (config == null)
          config = defaultConfig_;
-      ExoCache<? extends Serializable, ?> cache;
-      if (config.getImplementation() == null)
-      {
-         cache = new SimpleExoCache<Serializable, Object>();
-      }
-      else
-      {
-         ClassLoader cl = Thread.currentThread().getContextClassLoader();
-         Class<ExoCache<? extends Serializable, ?>> clazz =
-            (Class<ExoCache<? extends Serializable, ?>>)cl.loadClass(config.getImplementation());
-         cache = clazz.newInstance();
-      }
-      cache.setName(region);
-      cache.setLabel(config.getLabel());
-      cache.setMaxSize(config.getMaxSize());
-      cache.setLiveTime(config.getLiveTime());
-      cache.setLogEnabled(config.isLogEnabled());
-      if (cache.isLogEnabled())
-      {
-         cache.addCacheListener(loggingListener_);
-      }
 
-      //
+      // Ensure the configuration integrity
+      final ExoCacheConfig safeConfig = config.clone();
+      // Set the region as name 
+      safeConfig.setName(region);
+      final ExoCache simple = factory_.createCache(safeConfig);
+
       if (managed != null)
       {
-         managed.registerCache(cache);
+         managed.registerCache(simple);
       }
-
-      //
-      return cache;
+      return simple;
    }
 
    public Collection<ExoCache<? extends Serializable, ?>> getAllCacheInstances()
    {
       return cacheMap_.values();
    }
+
+   /**
+    * Default implementation of an {@link org.exoplatform.services.cache.ExoCacheFactory}
+    */
+   private class SimpleExoCacheFactory implements ExoCacheFactory
+   {
+
+      /**
+       * {@inheritDoc}
+       */
+      public ExoCache createCache(ExoCacheConfig config) throws ExoCacheInitException
+      {
+         final ExoCache simple = createCacheInstance(config);
+         simple.setName(config.getName());
+         simple.setLabel(config.getLabel());
+         simple.setMaxSize(config.getMaxSize());
+         simple.setLiveTime(config.getLiveTime());
+         //       simple.setReplicated(config.isRepicated());
+         //       simple.setDistributed(config.isDistributed());
+         //       if (simple.isDistributed()) {
+         //         simple.addCacheListener(distrbutedListener_);
+         //       }
+         simple.setLogEnabled(config.isLogEnabled());
+         if (simple.isLogEnabled())
+         {
+            simple.addCacheListener(loggingListener_);
+         }
+         return simple;
+      }
+
+      /**
+       * Create a new instance of ExoCache according to the given configuration
+       * @param config the ExoCache configuration
+       * @return a new instance of ExoCache
+       * @throws ExoCacheInitException if any exception happens while initializing the cache
+       */
+      @SuppressWarnings("unchecked")
+      private ExoCache createCacheInstance(ExoCacheConfig config) throws ExoCacheInitException
+      {
+         if (config.getImplementation() == null)
+         {
+            // No implementation has been defined
+            return new SimpleExoCache();
+         }
+         else
+         {
+            // An implementation has been defined
+            final ClassLoader cl = Thread.currentThread().getContextClassLoader();
+            try
+            {
+               final Class clazz = cl.loadClass(config.getImplementation());
+               return (ExoCache)clazz.newInstance();
+            }
+            catch (Exception e)
+            {
+               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
+                  + config.getImplementation(), e);
+            }
+         }
+      }
+   }
 }

Modified: kernel/branches/config-branch/exo.kernel.component.command/pom.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.command/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.command/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,7 +25,7 @@
    <parent>
       <groupId>org.exoplatform.kernel</groupId>
       <artifactId>kernel-parent</artifactId>
-      <version>2.2.0-Beta04</version>
+      <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <artifactId>exo.kernel.component.command</artifactId>

Modified: kernel/branches/config-branch/exo.kernel.component.common/pom.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.common/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.common/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,7 +25,7 @@
    <parent>
       <groupId>org.exoplatform.kernel</groupId>
       <artifactId>kernel-parent</artifactId>
-      <version>2.2.0-Beta04</version>
+      <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <artifactId>exo.kernel.component.common</artifactId>

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3 (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,64 +0,0 @@
-<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.kernel</groupId>
-		<artifactId>kernel-parent</artifactId>
-		<version>2.2.0-Beta05-SNAPSHOT</version>
-	</parent>
-
-	<artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
-	<name>eXo Kernel :: Cache Extension :: JBoss Cache Implementation</name>
-	<description>JBoss Cache Implementation for the Cache Service</description>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.exoplatform.tool</groupId>
-			<artifactId>exo.tool.framework.junit</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.exoplatform.kernel</groupId>
-			<artifactId>exo.kernel.commons</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.exoplatform.kernel</groupId>
-			<artifactId>exo.kernel.container</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.exoplatform.kernel</groupId>
-			<artifactId>exo.kernel.component.cache</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.jboss.cache</groupId>
-			<artifactId>jbosscache-core</artifactId>
-		</dependency>
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-plugin</artifactId>
-				<configuration>
-					<systemProperties>
-						<!-- 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>bind.address</name>
-							<value>127.0.0.1</value>
-						</property>
-						<property>
-							<name>jgroups.stack</name>
-							<value>udp</value>
-						</property>
-
-					</systemProperties>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-</project>

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,64 @@
+<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.kernel</groupId>
+		<artifactId>kernel-parent</artifactId>
+		<version>2.2.0-Beta05-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
+	<name>eXo Kernel :: Cache Extension :: JBoss Cache Implementation</name>
+	<description>JBoss Cache Implementation for the Cache Service</description>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.exoplatform.tool</groupId>
+			<artifactId>exo.tool.framework.junit</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.exoplatform.kernel</groupId>
+			<artifactId>exo.kernel.commons</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.exoplatform.kernel</groupId>
+			<artifactId>exo.kernel.container</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.exoplatform.kernel</groupId>
+			<artifactId>exo.kernel.component.cache</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.cache</groupId>
+			<artifactId>jbosscache-core</artifactId>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<systemProperties>
+						<!-- 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>bind.address</name>
+							<value>127.0.0.1</value>
+						</property>
+						<property>
+							<name>jgroups.stack</name>
+							<value>udp</value>
+						</property>
+
+					</systemProperties>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,640 +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.cache.impl.jboss;
-
-import org.exoplatform.services.cache.CacheInfo;
-import org.exoplatform.services.cache.CacheListener;
-import org.exoplatform.services.cache.CacheListenerContext;
-import org.exoplatform.services.cache.CachedObjectSelector;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ObjectCacheInfo;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheSPI;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Node;
-import org.jboss.cache.NodeSPI;
-import org.jboss.cache.notifications.annotation.NodeEvicted;
-import org.jboss.cache.notifications.annotation.NodeModified;
-import org.jboss.cache.notifications.annotation.NodeRemoved;
-import org.jboss.cache.notifications.event.EventImpl;
-import org.jboss.cache.notifications.event.NodeEvent;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * An {@link org.exoplatform.services.cache.ExoCache} implementation based on {@link org.jboss.cache.Node}.
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 20 juil. 2009  
- */
-public abstract class AbstractExoCache<K extends Serializable, V> implements ExoCache<K, V>
-{
-
-   /**
-    * Logger.
-    */
-   private static final Log LOG = ExoLogger.getLogger(AbstractExoCache.class);
-
-   private final AtomicInteger hits = new AtomicInteger(0);
-
-   private final AtomicInteger misses = new AtomicInteger(0);
-
-   private String label;
-
-   private String name;
-
-   private boolean distributed;
-
-   private boolean replicated;
-
-   private boolean logEnabled;
-
-   private final CopyOnWriteArrayList<ListenerContext<K, V>> listeners;
-
-   protected final CacheSPI<K, V> cache;
-
-   public AbstractExoCache(ExoCacheConfig config, Cache<K, V> cache)
-   {
-      this.cache = (CacheSPI<K, V>)cache;
-      this.listeners = new CopyOnWriteArrayList<ListenerContext<K, V>>();
-      setDistributed(config.isDistributed());
-      setLabel(config.getLabel());
-      setName(config.getName());
-      setLogEnabled(config.isLogEnabled());
-      setReplicated(config.isRepicated());
-      cache.getConfiguration().setInvocationBatchingEnabled(true);
-      cache.addCacheListener(new CacheEventListener());
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void addCacheListener(CacheListener<? super K, ? super V> listener)
-   {
-      if (listener == null)
-      {
-         throw new NullPointerException();
-      }
-      listeners.add(new ListenerContext<K, V>(listener, this));
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void clearCache()
-   {
-      final Node<K, V> rootNode = cache.getRoot();
-      for (Node<K, V> node : rootNode.getChildren())
-      {
-         if (node == null)
-         {
-            continue;
-         }
-         remove(getKey(node));
-      }
-      onClearCache();
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   @SuppressWarnings("unchecked")
-   public V get(Serializable name)
-   {
-      if (name == null)
-      {
-         return null;
-      }      
-      final V result = cache.get(getFqn(name), (K)name);
-      if (result == null)
-      {
-         misses.incrementAndGet();
-      }
-      else
-      {
-         hits.incrementAndGet();
-      }
-      onGet((K)name, result);
-      return result;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public int getCacheHit()
-   {
-      return hits.get();
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public int getCacheMiss()
-   {
-      return misses.get();
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public int getCacheSize()
-   {
-      return cache.getNumberOfNodes();
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public List<V> getCachedObjects()
-   {
-      final LinkedList<V> list = new LinkedList<V>();
-      for (Node<K, V> node : cache.getRoot().getChildren())
-      {
-         if (node == null)
-         {
-            continue;
-         }
-         final V value = node.get(getKey(node));
-         if (value != null)
-         {
-            list.add(value);
-         }
-      }
-      return list;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public String getLabel()
-   {
-      return label;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public String getName()
-   {
-      return name;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public boolean isDistributed()
-   {
-      return distributed;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public boolean isLogEnabled()
-   {
-      return logEnabled;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public boolean isReplicated()
-   {
-      return replicated;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void put(K key, V value) throws NullPointerException
-   {
-      if (key == null)
-      {
-         throw new NullPointerException("No null cache key accepted");
-      }      
-      putOnly(key, value);
-      onPut(key, value);
-   }
-
-   /**
-    * Only puts the data into the cache nothing more
-    */
-   private V putOnly(K key, V value)
-   {
-      return cache.put(getFqn(key), key, value);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void putMap(Map<? extends K, ? extends V> objs) throws NullPointerException, IllegalArgumentException
-   {
-      if (objs == null)
-      {
-         throw new NullPointerException("No null map accepted");
-      }
-      for (Serializable name : objs.keySet())
-      {
-         if (name == null)
-         {
-            throw new IllegalArgumentException("No null cache key accepted");
-         }
-      }      
-      cache.startBatch();
-      int total = 0;
-      try
-      {
-         // Start transaction
-         for (Map.Entry<? extends K, ? extends V> entry : objs.entrySet())
-         {
-            V value = putOnly(entry.getKey(), entry.getValue());
-            if (value == null)
-            {
-               total++;
-            }
-         }
-         cache.endBatch(true);
-         // End transaction
-         for (Map.Entry<? extends K, ? extends V> entry : objs.entrySet())
-         {
-            onPut(entry.getKey(), entry.getValue());
-         }
-      }
-      catch (Exception e)
-      {
-         cache.endBatch(false);
-         LOG.warn("An error occurs while executing the putMap method", e);
-      }
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   @SuppressWarnings("unchecked")
-   public V remove(Serializable name) throws NullPointerException
-   {
-      if (name == null)
-      {
-         throw new NullPointerException("No null cache key accepted");
-      }      
-      final Fqn<Serializable> fqn = getFqn(name);
-      final NodeSPI<K, V> node = cache.getNode(fqn);
-      V result = null;
-      if (node != null)
-      {
-         result = node.getDirect((K)name);
-         if (cache.removeNode(fqn))
-         {
-            onRemove((K)name, result);
-         }
-      }
-      return result;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public List<V> removeCachedObjects()
-   {
-      final List<V> list = getCachedObjects();
-      clearCache();
-      return list;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void select(CachedObjectSelector<? super K, ? super V> selector) throws Exception
-   {
-      if (selector == null)
-      {
-         throw new IllegalArgumentException("No null selector");
-      }      
-      for (Node<K, V> node : cache.getRoot().getChildren())
-      {
-         if (node == null)
-         {
-            continue;
-         }
-         final K key = getKey(node);
-         final V value = node.get(key);
-         ObjectCacheInfo<V> info = new ObjectCacheInfo<V>()
-         {
-            public V get()
-            {
-               return value;
-            }
-
-            public long getExpireTime()
-            {
-               // Cannot know: The expire time is managed by JBoss Cache itself
-               return -1;
-            }
-         };
-         if (selector.select(key, info))
-         {
-            selector.onSelect(this, key, info);
-         }
-      }
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void setDistributed(boolean distributed)
-   {
-      this.distributed = distributed;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void setLabel(String label)
-   {
-      this.label = label;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void setLogEnabled(boolean logEnabled)
-   {
-      this.logEnabled = logEnabled;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void setReplicated(boolean replicated)
-   {
-      this.replicated = replicated;
-   }
-
-   /**
-    * Returns the key related to the given node
-    */
-   private K getKey(Node<K, V> node)
-   {
-      return getKey(node.getFqn());
-   }
-
-   /**
-    * Returns the key related to the given Fqn
-    */
-   @SuppressWarnings("unchecked")
-   private K getKey(Fqn fqn)
-   {
-      return (K)fqn.get(0);
-   }
-
-   /**
-    * Returns the Fqn related to the given name
-    */
-   private Fqn<Serializable> getFqn(Serializable name)
-   {
-      return Fqn.fromElements(name);
-   }
-
-   void onExpire(K key, V obj)
-   {
-      if (listeners.isEmpty())
-      {
-         return;
-      }
-      for (ListenerContext<K, V> context : listeners)
-      {
-         try
-         {
-            context.onExpire(key, obj);
-         }
-         catch (Exception e)
-         {
-            if (LOG.isWarnEnabled())
-               LOG.warn("Cannot execute the CacheListener properly", e);
-         }
-      }
-   }
-
-   void onRemove(K key, V obj)
-   {
-      if (listeners.isEmpty())
-      {
-         return;
-      }
-      for (ListenerContext<K, V> context : listeners)
-      {
-         try
-         {
-            context.onRemove(key, obj);
-         }
-         catch (Exception e)
-         {
-            if (LOG.isWarnEnabled())
-               LOG.warn("Cannot execute the CacheListener properly", e);
-         }
-      }
-   }
-
-   void onPut(K key, V obj)
-   {
-      if (listeners.isEmpty())
-      {
-         return;
-      }
-      for (ListenerContext<K, V> context : listeners)
-         try
-         {
-            context.onPut(key, obj);
-         }
-         catch (Exception e)
-         {
-            if (LOG.isWarnEnabled())
-               LOG.warn("Cannot execute the CacheListener properly", e);
-         }
-   }
-
-   void onGet(K key, V obj)
-   {
-      if (listeners.isEmpty())
-      {
-         return;
-      }
-      for (ListenerContext<K, V> context : listeners)
-         try
-         {
-            context.onGet(key, obj);
-         }
-         catch (Exception e)
-         {
-            if (LOG.isWarnEnabled())
-               LOG.warn("Cannot execute the CacheListener properly", e);
-         }
-   }
-
-   void onClearCache()
-   {
-      if (listeners.isEmpty())
-      {
-         return;
-      }
-      for (ListenerContext<K, V> context : listeners)
-         try
-         {
-            context.onClearCache();
-         }
-         catch (Exception e)
-         {
-            if (LOG.isWarnEnabled())
-               LOG.warn("Cannot execute the CacheListener properly", e);
-         }
-   }
-
-   @org.jboss.cache.notifications.annotation.CacheListener
-   public class CacheEventListener
-   {
-
-      @NodeEvicted
-      public void nodeEvicted(NodeEvent ne)
-      {
-         if (ne.isPre())
-         {
-            // Cannot give the value since
-            // since it disturbs the eviction
-            // algorithms
-            onExpire(getKey(ne.getFqn()), null);
-         }
-      }
-
-      @NodeRemoved
-      public void nodeRemoved(NodeEvent ne)
-      {
-         if (ne.isPre() && !ne.isOriginLocal())
-         {
-            final Node<K, V> node = cache.getNode(ne.getFqn());
-            final K key = getKey(ne.getFqn());
-            onRemove(key, node.get(key));
-         }
-      }
-
-      @SuppressWarnings("unchecked")
-      @NodeModified
-      public void nodeModified(NodeEvent ne)
-      {
-         if (!ne.isOriginLocal() && !ne.isPre())
-         {
-            final K key = getKey(ne.getFqn());
-            if (ne instanceof EventImpl)
-            {
-               EventImpl evt = (EventImpl)ne;
-               Map<K, V> data = evt.getData();
-               if (data != null)
-               {
-                  onPut(key, data.get(key));
-                  return;
-               }
-            }
-            final Node<K, V> node = cache.getNode(ne.getFqn());
-            onPut(key, node.get(key));
-         }
-      }
-   }
-   
-   private static class ListenerContext<K extends Serializable, V> implements CacheListenerContext, CacheInfo
-   {
-
-      /** . */
-      private final ExoCache<K, V> cache;
-
-      /** . */
-      final CacheListener<? super K, ? super V> listener;
-
-      public ListenerContext(CacheListener<? super K, ? super V> listener, ExoCache<K, V> cache)
-      {
-         this.listener = listener;
-         this.cache = cache;
-      }
-
-      public CacheInfo getCacheInfo()
-      {
-         return this;
-      }
-
-      public String getName()
-      {
-         return cache.getName();
-      }
-
-      public int getMaxSize()
-      {
-         return cache.getMaxSize();
-      }
-
-      public long getLiveTime()
-      {
-         return cache.getLiveTime();
-      }
-
-      public int getSize()
-      {
-         return cache.getCacheSize();
-      }
-
-      void onExpire(K key, V obj) throws Exception
-      {
-         listener.onExpire(this, key, obj);
-      }
-
-      void onRemove(K key, V obj) throws Exception
-      {
-         listener.onRemove(this, key, obj);
-      }
-
-      void onPut(K key, V obj) throws Exception
-      {
-         listener.onPut(this, key, obj);
-      }
-
-      void onGet(K key, V obj) throws Exception
-      {
-         listener.onGet(this, key, obj);
-      }
-
-      void onClearCache() throws Exception
-      {
-         listener.onClearCache(this);
-      }
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/AbstractExoCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,640 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.services.cache.CacheInfo;
+import org.exoplatform.services.cache.CacheListener;
+import org.exoplatform.services.cache.CacheListenerContext;
+import org.exoplatform.services.cache.CachedObjectSelector;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ObjectCacheInfo;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.Node;
+import org.jboss.cache.NodeSPI;
+import org.jboss.cache.notifications.annotation.NodeEvicted;
+import org.jboss.cache.notifications.annotation.NodeModified;
+import org.jboss.cache.notifications.annotation.NodeRemoved;
+import org.jboss.cache.notifications.event.EventImpl;
+import org.jboss.cache.notifications.event.NodeEvent;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * An {@link org.exoplatform.services.cache.ExoCache} implementation based on {@link org.jboss.cache.Node}.
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 20 juil. 2009  
+ */
+public abstract class AbstractExoCache<K extends Serializable, V> implements ExoCache<K, V>
+{
+
+   /**
+    * Logger.
+    */
+   private static final Log LOG = ExoLogger.getLogger(AbstractExoCache.class);
+
+   private final AtomicInteger hits = new AtomicInteger(0);
+
+   private final AtomicInteger misses = new AtomicInteger(0);
+
+   private String label;
+
+   private String name;
+
+   private boolean distributed;
+
+   private boolean replicated;
+
+   private boolean logEnabled;
+
+   private final CopyOnWriteArrayList<ListenerContext<K, V>> listeners;
+
+   protected final CacheSPI<K, V> cache;
+
+   public AbstractExoCache(ExoCacheConfig config, Cache<K, V> cache)
+   {
+      this.cache = (CacheSPI<K, V>)cache;
+      this.listeners = new CopyOnWriteArrayList<ListenerContext<K, V>>();
+      setDistributed(config.isDistributed());
+      setLabel(config.getLabel());
+      setName(config.getName());
+      setLogEnabled(config.isLogEnabled());
+      setReplicated(config.isRepicated());
+      cache.getConfiguration().setInvocationBatchingEnabled(true);
+      cache.addCacheListener(new CacheEventListener());
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void addCacheListener(CacheListener<? super K, ? super V> listener)
+   {
+      if (listener == null)
+      {
+         throw new NullPointerException();
+      }
+      listeners.add(new ListenerContext<K, V>(listener, this));
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void clearCache()
+   {
+      final Node<K, V> rootNode = cache.getRoot();
+      for (Node<K, V> node : rootNode.getChildren())
+      {
+         if (node == null)
+         {
+            continue;
+         }
+         remove(getKey(node));
+      }
+      onClearCache();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   @SuppressWarnings("unchecked")
+   public V get(Serializable name)
+   {
+      if (name == null)
+      {
+         return null;
+      }      
+      final V result = cache.get(getFqn(name), (K)name);
+      if (result == null)
+      {
+         misses.incrementAndGet();
+      }
+      else
+      {
+         hits.incrementAndGet();
+      }
+      onGet((K)name, result);
+      return result;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public int getCacheHit()
+   {
+      return hits.get();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public int getCacheMiss()
+   {
+      return misses.get();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public int getCacheSize()
+   {
+      return cache.getNumberOfNodes();
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public List<V> getCachedObjects()
+   {
+      final LinkedList<V> list = new LinkedList<V>();
+      for (Node<K, V> node : cache.getRoot().getChildren())
+      {
+         if (node == null)
+         {
+            continue;
+         }
+         final V value = node.get(getKey(node));
+         if (value != null)
+         {
+            list.add(value);
+         }
+      }
+      return list;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getLabel()
+   {
+      return label;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public boolean isDistributed()
+   {
+      return distributed;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public boolean isLogEnabled()
+   {
+      return logEnabled;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public boolean isReplicated()
+   {
+      return replicated;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void put(K key, V value) throws NullPointerException
+   {
+      if (key == null)
+      {
+         throw new NullPointerException("No null cache key accepted");
+      }      
+      putOnly(key, value);
+      onPut(key, value);
+   }
+
+   /**
+    * Only puts the data into the cache nothing more
+    */
+   private V putOnly(K key, V value)
+   {
+      return cache.put(getFqn(key), key, value);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void putMap(Map<? extends K, ? extends V> objs) throws NullPointerException, IllegalArgumentException
+   {
+      if (objs == null)
+      {
+         throw new NullPointerException("No null map accepted");
+      }
+      for (Serializable name : objs.keySet())
+      {
+         if (name == null)
+         {
+            throw new IllegalArgumentException("No null cache key accepted");
+         }
+      }      
+      cache.startBatch();
+      int total = 0;
+      try
+      {
+         // Start transaction
+         for (Map.Entry<? extends K, ? extends V> entry : objs.entrySet())
+         {
+            V value = putOnly(entry.getKey(), entry.getValue());
+            if (value == null)
+            {
+               total++;
+            }
+         }
+         cache.endBatch(true);
+         // End transaction
+         for (Map.Entry<? extends K, ? extends V> entry : objs.entrySet())
+         {
+            onPut(entry.getKey(), entry.getValue());
+         }
+      }
+      catch (Exception e)
+      {
+         cache.endBatch(false);
+         LOG.warn("An error occurs while executing the putMap method", e);
+      }
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   @SuppressWarnings("unchecked")
+   public V remove(Serializable name) throws NullPointerException
+   {
+      if (name == null)
+      {
+         throw new NullPointerException("No null cache key accepted");
+      }      
+      final Fqn<Serializable> fqn = getFqn(name);
+      final NodeSPI<K, V> node = cache.getNode(fqn);
+      V result = null;
+      if (node != null)
+      {
+         result = node.getDirect((K)name);
+         if (cache.removeNode(fqn))
+         {
+            onRemove((K)name, result);
+         }
+      }
+      return result;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public List<V> removeCachedObjects()
+   {
+      final List<V> list = getCachedObjects();
+      clearCache();
+      return list;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void select(CachedObjectSelector<? super K, ? super V> selector) throws Exception
+   {
+      if (selector == null)
+      {
+         throw new IllegalArgumentException("No null selector");
+      }      
+      for (Node<K, V> node : cache.getRoot().getChildren())
+      {
+         if (node == null)
+         {
+            continue;
+         }
+         final K key = getKey(node);
+         final V value = node.get(key);
+         ObjectCacheInfo<V> info = new ObjectCacheInfo<V>()
+         {
+            public V get()
+            {
+               return value;
+            }
+
+            public long getExpireTime()
+            {
+               // Cannot know: The expire time is managed by JBoss Cache itself
+               return -1;
+            }
+         };
+         if (selector.select(key, info))
+         {
+            selector.onSelect(this, key, info);
+         }
+      }
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void setDistributed(boolean distributed)
+   {
+      this.distributed = distributed;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void setLabel(String label)
+   {
+      this.label = label;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void setLogEnabled(boolean logEnabled)
+   {
+      this.logEnabled = logEnabled;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public void setReplicated(boolean replicated)
+   {
+      this.replicated = replicated;
+   }
+
+   /**
+    * Returns the key related to the given node
+    */
+   private K getKey(Node<K, V> node)
+   {
+      return getKey(node.getFqn());
+   }
+
+   /**
+    * Returns the key related to the given Fqn
+    */
+   @SuppressWarnings("unchecked")
+   private K getKey(Fqn fqn)
+   {
+      return (K)fqn.get(0);
+   }
+
+   /**
+    * Returns the Fqn related to the given name
+    */
+   private Fqn<Serializable> getFqn(Serializable name)
+   {
+      return Fqn.fromElements(name);
+   }
+
+   void onExpire(K key, V obj)
+   {
+      if (listeners.isEmpty())
+      {
+         return;
+      }
+      for (ListenerContext<K, V> context : listeners)
+      {
+         try
+         {
+            context.onExpire(key, obj);
+         }
+         catch (Exception e)
+         {
+            if (LOG.isWarnEnabled())
+               LOG.warn("Cannot execute the CacheListener properly", e);
+         }
+      }
+   }
+
+   void onRemove(K key, V obj)
+   {
+      if (listeners.isEmpty())
+      {
+         return;
+      }
+      for (ListenerContext<K, V> context : listeners)
+      {
+         try
+         {
+            context.onRemove(key, obj);
+         }
+         catch (Exception e)
+         {
+            if (LOG.isWarnEnabled())
+               LOG.warn("Cannot execute the CacheListener properly", e);
+         }
+      }
+   }
+
+   void onPut(K key, V obj)
+   {
+      if (listeners.isEmpty())
+      {
+         return;
+      }
+      for (ListenerContext<K, V> context : listeners)
+         try
+         {
+            context.onPut(key, obj);
+         }
+         catch (Exception e)
+         {
+            if (LOG.isWarnEnabled())
+               LOG.warn("Cannot execute the CacheListener properly", e);
+         }
+   }
+
+   void onGet(K key, V obj)
+   {
+      if (listeners.isEmpty())
+      {
+         return;
+      }
+      for (ListenerContext<K, V> context : listeners)
+         try
+         {
+            context.onGet(key, obj);
+         }
+         catch (Exception e)
+         {
+            if (LOG.isWarnEnabled())
+               LOG.warn("Cannot execute the CacheListener properly", e);
+         }
+   }
+
+   void onClearCache()
+   {
+      if (listeners.isEmpty())
+      {
+         return;
+      }
+      for (ListenerContext<K, V> context : listeners)
+         try
+         {
+            context.onClearCache();
+         }
+         catch (Exception e)
+         {
+            if (LOG.isWarnEnabled())
+               LOG.warn("Cannot execute the CacheListener properly", e);
+         }
+   }
+
+   @org.jboss.cache.notifications.annotation.CacheListener
+   public class CacheEventListener
+   {
+
+      @NodeEvicted
+      public void nodeEvicted(NodeEvent ne)
+      {
+         if (ne.isPre())
+         {
+            // Cannot give the value since
+            // since it disturbs the eviction
+            // algorithms
+            onExpire(getKey(ne.getFqn()), null);
+         }
+      }
+
+      @NodeRemoved
+      public void nodeRemoved(NodeEvent ne)
+      {
+         if (ne.isPre() && !ne.isOriginLocal())
+         {
+            final Node<K, V> node = cache.getNode(ne.getFqn());
+            final K key = getKey(ne.getFqn());
+            onRemove(key, node.get(key));
+         }
+      }
+
+      @SuppressWarnings("unchecked")
+      @NodeModified
+      public void nodeModified(NodeEvent ne)
+      {
+         if (!ne.isOriginLocal() && !ne.isPre())
+         {
+            final K key = getKey(ne.getFqn());
+            if (ne instanceof EventImpl)
+            {
+               EventImpl evt = (EventImpl)ne;
+               Map<K, V> data = evt.getData();
+               if (data != null)
+               {
+                  onPut(key, data.get(key));
+                  return;
+               }
+            }
+            final Node<K, V> node = cache.getNode(ne.getFqn());
+            onPut(key, node.get(key));
+         }
+      }
+   }
+   
+   private static class ListenerContext<K extends Serializable, V> implements CacheListenerContext, CacheInfo
+   {
+
+      /** . */
+      private final ExoCache<K, V> cache;
+
+      /** . */
+      final CacheListener<? super K, ? super V> listener;
+
+      public ListenerContext(CacheListener<? super K, ? super V> listener, ExoCache<K, V> cache)
+      {
+         this.listener = listener;
+         this.cache = cache;
+      }
+
+      public CacheInfo getCacheInfo()
+      {
+         return this;
+      }
+
+      public String getName()
+      {
+         return cache.getName();
+      }
+
+      public int getMaxSize()
+      {
+         return cache.getMaxSize();
+      }
+
+      public long getLiveTime()
+      {
+         return cache.getLiveTime();
+      }
+
+      public int getSize()
+      {
+         return cache.getCacheSize();
+      }
+
+      void onExpire(K key, V obj) throws Exception
+      {
+         listener.onExpire(this, key, obj);
+      }
+
+      void onRemove(K key, V obj) throws Exception
+      {
+         listener.onRemove(this, key, obj);
+      }
+
+      void onPut(K key, V obj) throws Exception
+      {
+         listener.onPut(this, key, obj);
+      }
+
+      void onGet(K key, V obj) throws Exception
+      {
+         listener.onGet(this, key, obj);
+      }
+
+      void onClearCache() throws Exception
+      {
+         listener.onClearCache(this);
+      }
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,59 +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.cache.impl.jboss;
-
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.jboss.cache.Cache;
-
-import java.io.Serializable;
-
-/**
- * This class is used to create the cache according to the given 
- * configuration {@link org.exoplatform.services.cache.ExoCacheConfig}
- * 
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 20 juil. 2009  
- */
-public interface ExoCacheCreator
-{
-
-   /**
-    * Creates an eXo cache according to the given configuration {@link org.exoplatform.services.cache.ExoCacheConfig}
-    * @param config the configuration of the cache to apply
-    * @param cache the cache to initialize
-    * @exception ExoCacheInitException if an exception happens while initializing the cache
-    */
-   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException;
-
-   /**
-    * Returns the type of {@link org.exoplatform.services.cache.ExoCacheConfig} expected by the creator  
-    * @return the expected type
-    */
-   public Class<? extends ExoCacheConfig> getExpectedConfigType();
-
-   /**
-    * Returns the name of the implementation expected by the creator. This is mainly used to be backward compatible
-    * @return the expected by the creator
-    */
-   public String getExpectedImplementation();
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -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.cache.impl.jboss;
+
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.jboss.cache.Cache;
+
+import java.io.Serializable;
+
+/**
+ * This class is used to create the cache according to the given 
+ * configuration {@link org.exoplatform.services.cache.ExoCacheConfig}
+ * 
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 20 juil. 2009  
+ */
+public interface ExoCacheCreator
+{
+
+   /**
+    * Creates an eXo cache according to the given configuration {@link org.exoplatform.services.cache.ExoCacheConfig}
+    * @param config the configuration of the cache to apply
+    * @param cache the cache to initialize
+    * @exception ExoCacheInitException if an exception happens while initializing the cache
+    */
+   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException;
+
+   /**
+    * Returns the type of {@link org.exoplatform.services.cache.ExoCacheConfig} expected by the creator  
+    * @return the expected type
+    */
+   public Class<? extends ExoCacheConfig> getExpectedConfigType();
+
+   /**
+    * Returns the name of the implementation expected by the creator. This is mainly used to be backward compatible
+    * @return the expected by the creator
+    */
+   public String getExpectedImplementation();
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,60 +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.cache.impl.jboss;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-
-/**
- * This class allows us to define new creators
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 20 juil. 2009  
- */
-public class ExoCacheCreatorPlugin extends BaseComponentPlugin
-{
-
-   /**
-    * The list of all the creators defined for this ComponentPlugin
-    */
-   private final List<ExoCacheCreator> creators;
-
-   public ExoCacheCreatorPlugin(InitParams params)
-   {
-      creators = new ArrayList<ExoCacheCreator>();
-      List<?> configs = params.getObjectParamValues(ExoCacheCreator.class);
-      for (int i = 0; i < configs.size(); i++)
-      {
-         ExoCacheCreator config = (ExoCacheCreator)configs.get(i);
-         creators.add(config);
-      }
-   }
-
-   /**
-    * Returns all the creators defined for this ComponentPlugin
-    */
-   public List<ExoCacheCreator> getCreators()
-   {
-      return creators;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheCreatorPlugin.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -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.cache.impl.jboss;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.exoplatform.container.component.BaseComponentPlugin;
+import org.exoplatform.container.xml.InitParams;
+
+/**
+ * This class allows us to define new creators
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 20 juil. 2009  
+ */
+public class ExoCacheCreatorPlugin extends BaseComponentPlugin
+{
+
+   /**
+    * The list of all the creators defined for this ComponentPlugin
+    */
+   private final List<ExoCacheCreator> creators;
+
+   public ExoCacheCreatorPlugin(InitParams params)
+   {
+      creators = new ArrayList<ExoCacheCreator>();
+      List<?> configs = params.getObjectParamValues(ExoCacheCreator.class);
+      for (int i = 0; i < configs.size(); i++)
+      {
+         ExoCacheCreator config = (ExoCacheCreator)configs.get(i);
+         creators.add(config);
+      }
+   }
+
+   /**
+    * Returns all the creators defined for this ComponentPlugin
+    */
+   public List<ExoCacheCreator> getCreators()
+   {
+      return creators;
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,63 +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.cache.impl.jboss;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-
-/**
- * This class is used to define custom configurations
- * 
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 23 juil. 2009  
- */
-public class ExoCacheFactoryConfigPlugin extends BaseComponentPlugin
-{
-
-   /**
-    * The map of all the creators defined for this ComponentPlugin
-    */
-   private final Map<String, String> configs;
-
-   @SuppressWarnings("unchecked")
-   public ExoCacheFactoryConfigPlugin(InitParams params)
-   {
-      configs = new HashMap<String, String>();
-      for (Iterator<ValueParam> iterator = params.getValueParamIterator(); iterator.hasNext();)
-      {
-         ValueParam vParam = iterator.next();
-         configs.put(vParam.getName(), vParam.getValue());
-      }
-   }
-
-   /**
-    * Returns all the configurations defined for this ComponentPlugin
-    */
-   public Map<String, String> getConfigs()
-   {
-      return configs;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryConfigPlugin.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,63 @@
+/*
+ * 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.cache.impl.jboss;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.exoplatform.container.component.BaseComponentPlugin;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+
+/**
+ * This class is used to define custom configurations
+ * 
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 23 juil. 2009  
+ */
+public class ExoCacheFactoryConfigPlugin extends BaseComponentPlugin
+{
+
+   /**
+    * The map of all the creators defined for this ComponentPlugin
+    */
+   private final Map<String, String> configs;
+
+   @SuppressWarnings("unchecked")
+   public ExoCacheFactoryConfigPlugin(InitParams params)
+   {
+      configs = new HashMap<String, String>();
+      for (Iterator<ValueParam> iterator = params.getValueParamIterator(); iterator.hasNext();)
+      {
+         ValueParam vParam = iterator.next();
+         configs.put(vParam.getName(), vParam.getValue());
+      }
+   }
+
+   /**
+    * Returns all the configurations defined for this ComponentPlugin
+    */
+   public Map<String, String> getConfigs()
+   {
+      return configs;
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,248 +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.cache.impl.jboss;
-
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheFactory;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheCreator;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.EvictionConfig;
-import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.config.Configuration.CacheMode;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * This class is the JBoss Cache implementation of the {@link org.exoplatform.services.cache.ExoCacheFactory}
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 17 juil. 2009  
- */
-public class ExoCacheFactoryImpl implements ExoCacheFactory
-{
-
-   /**
-    * The logger
-    */
-   private static final Log LOG = ExoLogger.getLogger(ExoCacheFactoryImpl.class);
-
-   /**
-    * The initial parameter key that defines the full path of the configuration template
-    */
-   private static final String CACHE_CONFIG_TEMPLATE_KEY = "cache.config.template";
-
-   /**
-    * The configuration manager that allows us to retrieve a configuration file in several different
-    * manners
-    */
-   private final ConfigurationManager configManager;
-
-   /**
-    * The full path of the configuration template
-    */
-   private final String cacheConfigTemplate;
-
-   /**
-    * The mapping between the configuration types and the creators
-    */
-   private final Map<Class<? extends ExoCacheConfig>, ExoCacheCreator> mappingConfigTypeCreators =
-      new HashMap<Class<? extends ExoCacheConfig>, ExoCacheCreator>();
-
-   /**
-    * The mapping between the implementations and the creators. This is mainly used for backward compatibility
-    */
-   private final Map<String, ExoCacheCreator> mappingImplCreators = new HashMap<String, ExoCacheCreator>();
-
-   /**
-    * The mapping between the cache names and the configuration paths
-    */
-   private final Map<String, String> mappingCacheNameConfig = new HashMap<String, String>();
-
-   /**
-    * The default creator
-    */
-   private final ExoCacheCreator defaultCreator = new FIFOExoCacheCreator();
-
-   public ExoCacheFactoryImpl(InitParams params, ConfigurationManager configManager)
-   {
-      this.configManager = configManager;
-      this.cacheConfigTemplate = getValueParam(params, CACHE_CONFIG_TEMPLATE_KEY);
-      if (cacheConfigTemplate == null)
-      {
-         throw new RuntimeException("The parameter '" + CACHE_CONFIG_TEMPLATE_KEY + "' must be set");
-      }
-   }
-
-   /**
-    * To create a new cache instance according to the given configuration, we follow the steps below:
-    * 
-    * 1. We first try to find if a specific location of the cache configuration has been defined thanks
-    * to an external component plugin of type ExoCacheFactoryConfigPlugin
-    * 2. If no specific location has been defined, we use the default configuration which is
-    * "${CACHE_CONFIG_TEMPLATE_KEY}"
-    */
-   public ExoCache<Serializable, Object> createCache(ExoCacheConfig config) throws ExoCacheInitException
-   {
-      final String region = config.getName();
-      final String customConfig = mappingCacheNameConfig.get(region);
-      final Cache<Serializable, Object> cache;
-      final CacheFactory<Serializable, Object> factory = new DefaultCacheFactory<Serializable, Object>();
-      final ExoCache<Serializable, Object> eXoCache;
-      try
-      {
-         if (customConfig != null)
-         {
-            // A custom configuration has been set
-            if (LOG.isInfoEnabled())
-               LOG.info("A custom configuration has been set for the cache '" + region + "'.");
-            cache = factory.createCache(configManager.getInputStream(customConfig), false);
-         }
-         else
-         {
-            // No custom configuration has been found, a configuration template will be used 
-            if (LOG.isInfoEnabled())
-               LOG.info("The configuration template will be used for the the cache '" + region + "'.");
-            cache = factory.createCache(configManager.getInputStream(cacheConfigTemplate), false);
-            if (!config.isDistributed())
-            {
-               // The cache is local
-               cache.getConfiguration().setCacheMode(CacheMode.LOCAL);
-            }
-            // Re initialize the template to avoid conflicts
-            cleanConfigurationTemplate(cache, region);
-         }
-         final ExoCacheCreator creator = getExoCacheCreator(config);
-         // Create the cache
-         eXoCache = creator.create(config, cache);
-         // Create the cache
-         cache.create();
-         // Start the cache
-         cache.start();
-      }
-      catch (Exception e)
-      {
-         throw new ExoCacheInitException("The cache '" + region + "' could not be initialized", e);
-      }
-      return eXoCache;
-   }
-
-   /**
-    * Add a list of creators to register
-    * @param plugin the plugin that contains the creators
-    */
-   public void addCreator(ExoCacheCreatorPlugin plugin)
-   {
-      final List<ExoCacheCreator> creators = plugin.getCreators();
-      for (ExoCacheCreator creator : creators)
-      {
-         mappingConfigTypeCreators.put(creator.getExpectedConfigType(), creator);
-         mappingImplCreators.put(creator.getExpectedImplementation(), creator);
-      }
-   }
-
-   /**
-    * Add a list of custom configuration to register
-    * @param plugin the plugin that contains the configs
-    */
-   public void addConfig(ExoCacheFactoryConfigPlugin plugin)
-   {
-      final Map<String, String> configs = plugin.getConfigs();
-      mappingCacheNameConfig.putAll(configs);
-   }
-
-   /**
-    * Returns the value of the ValueParam if and only if the value is not empty
-    */
-   private static String getValueParam(InitParams params, String key)
-   {
-      if (params == null)
-      {
-         return null;
-      }
-      final ValueParam vp = params.getValueParam(key);
-      String result;
-      if (vp == null || (result = vp.getValue()) == null || (result = result.trim()).length() == 0)
-      {
-         return null;
-      }
-      return result;
-   }
-
-   /**
-    * Returns the most relevant ExoCacheCreator according to the give configuration
-    */
-   protected ExoCacheCreator getExoCacheCreator(ExoCacheConfig config)
-   {
-      ExoCacheCreator creator = mappingConfigTypeCreators.get(config.getClass());
-      if (creator == null)
-      {
-         // No creator for this type has been found, let's try the implementation field
-         creator = mappingImplCreators.get(config.getImplementation());
-         if (creator == null)
-         {
-            // No creator can be found, we will use the default creator
-            if (LOG.isInfoEnabled())
-               LOG.info("No cache creator has been found for the the cache '" + config.getName()
-                  + "', the default one will be used.");
-            return defaultCreator;
-         }
-      }
-      if (LOG.isInfoEnabled())
-         LOG.info("The cache '" + config.getName() + "' will be created with '" + creator.getClass() + "'.");
-      return creator;
-   }
-
-   /**
-    * Clean the configuration template to prevent conflicts
-    */
-   protected void cleanConfigurationTemplate(Cache<Serializable, Object> cache, String region)
-   {
-      final Configuration config = cache.getConfiguration();
-      // Reset the eviction policies 
-      EvictionConfig evictionConfig = config.getEvictionConfig();
-      if (evictionConfig == null)
-      {
-         // If not eviction config exists, we create an empty one
-         evictionConfig = new EvictionConfig();
-         config.setEvictionConfig(evictionConfig);
-      }
-      evictionConfig.setEvictionRegionConfigs(new LinkedList<EvictionRegionConfig>());
-      // Rename the cluster name
-      String clusterName = config.getClusterName();
-      if (clusterName != null && (clusterName = clusterName.trim()).length() > 0)
-      {
-         config.setClusterName(clusterName + " " + region);
-      }
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,248 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheFactory;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheCreator;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheFactory;
+import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.EvictionConfig;
+import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.config.Configuration.CacheMode;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class is the JBoss Cache implementation of the {@link org.exoplatform.services.cache.ExoCacheFactory}
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 17 juil. 2009  
+ */
+public class ExoCacheFactoryImpl implements ExoCacheFactory
+{
+
+   /**
+    * The logger
+    */
+   private static final Log LOG = ExoLogger.getLogger(ExoCacheFactoryImpl.class);
+
+   /**
+    * The initial parameter key that defines the full path of the configuration template
+    */
+   private static final String CACHE_CONFIG_TEMPLATE_KEY = "cache.config.template";
+
+   /**
+    * The configuration manager that allows us to retrieve a configuration file in several different
+    * manners
+    */
+   private final ConfigurationManager configManager;
+
+   /**
+    * The full path of the configuration template
+    */
+   private final String cacheConfigTemplate;
+
+   /**
+    * The mapping between the configuration types and the creators
+    */
+   private final Map<Class<? extends ExoCacheConfig>, ExoCacheCreator> mappingConfigTypeCreators =
+      new HashMap<Class<? extends ExoCacheConfig>, ExoCacheCreator>();
+
+   /**
+    * The mapping between the implementations and the creators. This is mainly used for backward compatibility
+    */
+   private final Map<String, ExoCacheCreator> mappingImplCreators = new HashMap<String, ExoCacheCreator>();
+
+   /**
+    * The mapping between the cache names and the configuration paths
+    */
+   private final Map<String, String> mappingCacheNameConfig = new HashMap<String, String>();
+
+   /**
+    * The default creator
+    */
+   private final ExoCacheCreator defaultCreator = new FIFOExoCacheCreator();
+
+   public ExoCacheFactoryImpl(InitParams params, ConfigurationManager configManager)
+   {
+      this.configManager = configManager;
+      this.cacheConfigTemplate = getValueParam(params, CACHE_CONFIG_TEMPLATE_KEY);
+      if (cacheConfigTemplate == null)
+      {
+         throw new RuntimeException("The parameter '" + CACHE_CONFIG_TEMPLATE_KEY + "' must be set");
+      }
+   }
+
+   /**
+    * To create a new cache instance according to the given configuration, we follow the steps below:
+    * 
+    * 1. We first try to find if a specific location of the cache configuration has been defined thanks
+    * to an external component plugin of type ExoCacheFactoryConfigPlugin
+    * 2. If no specific location has been defined, we use the default configuration which is
+    * "${CACHE_CONFIG_TEMPLATE_KEY}"
+    */
+   public ExoCache<Serializable, Object> createCache(ExoCacheConfig config) throws ExoCacheInitException
+   {
+      final String region = config.getName();
+      final String customConfig = mappingCacheNameConfig.get(region);
+      final Cache<Serializable, Object> cache;
+      final CacheFactory<Serializable, Object> factory = new DefaultCacheFactory<Serializable, Object>();
+      final ExoCache<Serializable, Object> eXoCache;
+      try
+      {
+         if (customConfig != null)
+         {
+            // A custom configuration has been set
+            if (LOG.isInfoEnabled())
+               LOG.info("A custom configuration has been set for the cache '" + region + "'.");
+            cache = factory.createCache(configManager.getInputStream(customConfig), false);
+         }
+         else
+         {
+            // No custom configuration has been found, a configuration template will be used 
+            if (LOG.isInfoEnabled())
+               LOG.info("The configuration template will be used for the the cache '" + region + "'.");
+            cache = factory.createCache(configManager.getInputStream(cacheConfigTemplate), false);
+            if (!config.isDistributed())
+            {
+               // The cache is local
+               cache.getConfiguration().setCacheMode(CacheMode.LOCAL);
+            }
+            // Re initialize the template to avoid conflicts
+            cleanConfigurationTemplate(cache, region);
+         }
+         final ExoCacheCreator creator = getExoCacheCreator(config);
+         // Create the cache
+         eXoCache = creator.create(config, cache);
+         // Create the cache
+         cache.create();
+         // Start the cache
+         cache.start();
+      }
+      catch (Exception e)
+      {
+         throw new ExoCacheInitException("The cache '" + region + "' could not be initialized", e);
+      }
+      return eXoCache;
+   }
+
+   /**
+    * Add a list of creators to register
+    * @param plugin the plugin that contains the creators
+    */
+   public void addCreator(ExoCacheCreatorPlugin plugin)
+   {
+      final List<ExoCacheCreator> creators = plugin.getCreators();
+      for (ExoCacheCreator creator : creators)
+      {
+         mappingConfigTypeCreators.put(creator.getExpectedConfigType(), creator);
+         mappingImplCreators.put(creator.getExpectedImplementation(), creator);
+      }
+   }
+
+   /**
+    * Add a list of custom configuration to register
+    * @param plugin the plugin that contains the configs
+    */
+   public void addConfig(ExoCacheFactoryConfigPlugin plugin)
+   {
+      final Map<String, String> configs = plugin.getConfigs();
+      mappingCacheNameConfig.putAll(configs);
+   }
+
+   /**
+    * Returns the value of the ValueParam if and only if the value is not empty
+    */
+   private static String getValueParam(InitParams params, String key)
+   {
+      if (params == null)
+      {
+         return null;
+      }
+      final ValueParam vp = params.getValueParam(key);
+      String result;
+      if (vp == null || (result = vp.getValue()) == null || (result = result.trim()).length() == 0)
+      {
+         return null;
+      }
+      return result;
+   }
+
+   /**
+    * Returns the most relevant ExoCacheCreator according to the give configuration
+    */
+   protected ExoCacheCreator getExoCacheCreator(ExoCacheConfig config)
+   {
+      ExoCacheCreator creator = mappingConfigTypeCreators.get(config.getClass());
+      if (creator == null)
+      {
+         // No creator for this type has been found, let's try the implementation field
+         creator = mappingImplCreators.get(config.getImplementation());
+         if (creator == null)
+         {
+            // No creator can be found, we will use the default creator
+            if (LOG.isInfoEnabled())
+               LOG.info("No cache creator has been found for the the cache '" + config.getName()
+                  + "', the default one will be used.");
+            return defaultCreator;
+         }
+      }
+      if (LOG.isInfoEnabled())
+         LOG.info("The cache '" + config.getName() + "' will be created with '" + creator.getClass() + "'.");
+      return creator;
+   }
+
+   /**
+    * Clean the configuration template to prevent conflicts
+    */
+   protected void cleanConfigurationTemplate(Cache<Serializable, Object> cache, String region)
+   {
+      final Configuration config = cache.getConfiguration();
+      // Reset the eviction policies 
+      EvictionConfig evictionConfig = config.getEvictionConfig();
+      if (evictionConfig == null)
+      {
+         // If not eviction config exists, we create an empty one
+         evictionConfig = new EvictionConfig();
+         config.setEvictionConfig(evictionConfig);
+      }
+      evictionConfig.setEvictionRegionConfigs(new LinkedList<EvictionRegionConfig>());
+      // Rename the cluster name
+      String clusterName = config.getClusterName();
+      if (clusterName != null && (clusterName = clusterName.trim()).length() > 0)
+      {
+         config.setClusterName(clusterName + " " + region);
+      }
+   }
+}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,57 +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.cache.impl.jboss.fifo;
-
-import org.exoplatform.services.cache.ExoCacheConfig;
-
-/**
- * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the FIFO implementation
- * 
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class FIFOExoCacheConfig extends ExoCacheConfig
-{
-
-   private int maxNodes;
-
-   private long minTimeToLive;
-
-   public int getMaxNodes()
-   {
-      return maxNodes;
-   }
-
-   public void setMaxNodes(int maxNodes)
-   {
-      this.maxNodes = maxNodes;
-   }
-
-   public long getMinTimeToLive()
-   {
-      return minTimeToLive;
-   }
-
-   public void setMinTimeToLive(long minTimeToLive)
-   {
-      this.minTimeToLive = minTimeToLive;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -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.cache.impl.jboss.fifo;
+
+import org.exoplatform.services.cache.ExoCacheConfig;
+
+/**
+ * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the FIFO implementation
+ * 
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class FIFOExoCacheConfig extends ExoCacheConfig
+{
+
+   private int maxNodes;
+
+   private long minTimeToLive;
+
+   public int getMaxNodes()
+   {
+      return maxNodes;
+   }
+
+   public void setMaxNodes(int maxNodes)
+   {
+      this.maxNodes = maxNodes;
+   }
+
+   public long getMinTimeToLive()
+   {
+      return minTimeToLive;
+   }
+
+   public void setMinTimeToLive(long minTimeToLive)
+   {
+      this.minTimeToLive = minTimeToLive;
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,128 +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.cache.impl.jboss.fifo;
-
-import org.exoplatform.management.annotations.ManagedDescription;
-import org.exoplatform.management.annotations.ManagedName;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
-import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
-import org.jboss.cache.Cache;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.EvictionConfig;
-import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.eviction.FIFOAlgorithmConfig;
-
-import java.io.Serializable;
-
-/**
- * The FIFO Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 20 juil. 2009  
- */
-public class FIFOExoCacheCreator implements ExoCacheCreator
-{
-
-   /**
-    * The expected implementation name
-    */
-   public static final String EXPECTED_IMPL = "FIFO";
-
-   /**
-    * {@inheritDoc}
-    */
-   public String getExpectedImplementation()
-   {
-      return EXPECTED_IMPL;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public Class<? extends ExoCacheConfig> getExpectedConfigType()
-   {
-      return FIFOExoCacheConfig.class;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
-   {
-      if (config instanceof FIFOExoCacheConfig)
-      {
-         final FIFOExoCacheConfig fifoConfig = (FIFOExoCacheConfig)config;
-         return create(config, cache, fifoConfig.getMaxNodes(), fifoConfig.getMinTimeToLive());
-      }
-      else
-      {
-         final long period = config.getLiveTime();
-         return create(config, cache, config.getMaxSize(), period > 0 ? period * 1000 : 0);
-      }
-   }
-
-   /**
-    * Creates a new ExoCache instance with the relevant parameters
-    */
-   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, long minTimeToLive)
-      throws ExoCacheInitException
-   {
-      final Configuration configuration = cache.getConfiguration();
-      final FIFOAlgorithmConfig fifo = new FIFOAlgorithmConfig(maxNodes);
-      fifo.setMinTimeToLive(minTimeToLive);
-      // Create an eviction region config
-      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, fifo);
-
-      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
-      evictionConfig.setDefaultEvictionRegionConfig(erc);
-
-      return new AbstractExoCache<Serializable, Object>(config, cache)
-      {
-
-         public void setMaxSize(int max)
-         {
-            fifo.setMaxNodes(max);
-         }
-
-         public void setLiveTime(long period)
-         {
-            fifo.setMinTimeToLive(period);
-         }
-
-         @ManagedName("MaxNodes")
-         @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
-         public int getMaxSize()
-         {
-            return fifo.getMaxNodes();
-         }
-
-         @ManagedName("MinTimeToLive")
-         @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
-         public long getLiveTime()
-         {
-            return fifo.getMinTimeToLive();
-         }
-      };
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -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.cache.impl.jboss.fifo;
+
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.annotations.ManagedName;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
+import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
+import org.jboss.cache.Cache;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.EvictionConfig;
+import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.eviction.FIFOAlgorithmConfig;
+
+import java.io.Serializable;
+
+/**
+ * The FIFO Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 20 juil. 2009  
+ */
+public class FIFOExoCacheCreator implements ExoCacheCreator
+{
+
+   /**
+    * The expected implementation name
+    */
+   public static final String EXPECTED_IMPL = "FIFO";
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getExpectedImplementation()
+   {
+      return EXPECTED_IMPL;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Class<? extends ExoCacheConfig> getExpectedConfigType()
+   {
+      return FIFOExoCacheConfig.class;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
+   {
+      if (config instanceof FIFOExoCacheConfig)
+      {
+         final FIFOExoCacheConfig fifoConfig = (FIFOExoCacheConfig)config;
+         return create(config, cache, fifoConfig.getMaxNodes(), fifoConfig.getMinTimeToLive());
+      }
+      else
+      {
+         final long period = config.getLiveTime();
+         return create(config, cache, config.getMaxSize(), period > 0 ? period * 1000 : 0);
+      }
+   }
+
+   /**
+    * Creates a new ExoCache instance with the relevant parameters
+    */
+   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, long minTimeToLive)
+      throws ExoCacheInitException
+   {
+      final Configuration configuration = cache.getConfiguration();
+      final FIFOAlgorithmConfig fifo = new FIFOAlgorithmConfig(maxNodes);
+      fifo.setMinTimeToLive(minTimeToLive);
+      // Create an eviction region config
+      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, fifo);
+
+      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
+      evictionConfig.setDefaultEvictionRegionConfig(erc);
+
+      return new AbstractExoCache<Serializable, Object>(config, cache)
+      {
+
+         public void setMaxSize(int max)
+         {
+            fifo.setMaxNodes(max);
+         }
+
+         public void setLiveTime(long period)
+         {
+            fifo.setMinTimeToLive(period);
+         }
+
+         @ManagedName("MaxNodes")
+         @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
+         public int getMaxSize()
+         {
+            return fifo.getMaxNodes();
+         }
+
+         @ManagedName("MinTimeToLive")
+         @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
+         public long getLiveTime()
+         {
+            return fifo.getMinTimeToLive();
+         }
+      };
+   }
+}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,69 +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.cache.impl.jboss.lfu;
-
-import org.exoplatform.services.cache.ExoCacheConfig;
-
-/**
- * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the LFU implementation
- * 
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class LFUExoCacheConfig extends ExoCacheConfig
-{
-
-   private int maxNodes;
-
-   private int minNodes;
-
-   private long minTimeToLive;
-
-   public int getMaxNodes()
-   {
-      return maxNodes;
-   }
-
-   public void setMaxNodes(int maxNodes)
-   {
-      this.maxNodes = maxNodes;
-   }
-
-   public int getMinNodes()
-   {
-      return minNodes;
-   }
-
-   public void setMinNodes(int minNodes)
-   {
-      this.minNodes = minNodes;
-   }
-
-   public long getMinTimeToLive()
-   {
-      return minTimeToLive;
-   }
-
-   public void setMinTimeToLive(long minTimeToLive)
-   {
-      this.minTimeToLive = minTimeToLive;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,69 @@
+/*
+ * 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.cache.impl.jboss.lfu;
+
+import org.exoplatform.services.cache.ExoCacheConfig;
+
+/**
+ * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the LFU implementation
+ * 
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class LFUExoCacheConfig extends ExoCacheConfig
+{
+
+   private int maxNodes;
+
+   private int minNodes;
+
+   private long minTimeToLive;
+
+   public int getMaxNodes()
+   {
+      return maxNodes;
+   }
+
+   public void setMaxNodes(int maxNodes)
+   {
+      this.maxNodes = maxNodes;
+   }
+
+   public int getMinNodes()
+   {
+      return minNodes;
+   }
+
+   public void setMinNodes(int minNodes)
+   {
+      this.minNodes = minNodes;
+   }
+
+   public long getMinTimeToLive()
+   {
+      return minTimeToLive;
+   }
+
+   public void setMinTimeToLive(long minTimeToLive)
+   {
+      this.minTimeToLive = minTimeToLive;
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,160 +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.cache.impl.jboss.lfu;
-
-import org.exoplatform.management.annotations.Managed;
-import org.exoplatform.management.annotations.ManagedDescription;
-import org.exoplatform.management.annotations.ManagedName;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
-import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
-import org.jboss.cache.Cache;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.EvictionConfig;
-import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.eviction.LFUAlgorithmConfig;
-
-import java.io.Serializable;
-
-/**
- * The LFU Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class LFUExoCacheCreator implements ExoCacheCreator
-{
-
-   /**
-    * The expected implementation name
-    */
-   public static final String EXPECTED_IMPL = "LFU";
-
-   /**
-    * The default value for the parameter maxAge
-    */
-   protected int defaultMinNodes;
-
-   /**
-    * {@inheritDoc}
-    */
-   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
-   {
-      if (config instanceof LFUExoCacheConfig)
-      {
-         final LFUExoCacheConfig lfuConfig = (LFUExoCacheConfig)config;
-         return create(config, cache, lfuConfig.getMaxNodes(), lfuConfig.getMinNodes(), lfuConfig.getMinTimeToLive());
-      }
-      else
-      {
-         final long period = config.getLiveTime();
-         return create(config, cache, config.getMaxSize(), defaultMinNodes, period > 0 ? period * 1000 : 0);
-      }
-   }
-
-   /**
-    * Creates a new ExoCache instance with the relevant parameters
-    */
-   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, int minNodes,
-      long minTimeToLive) throws ExoCacheInitException
-   {
-      final Configuration configuration = cache.getConfiguration();
-      final LFUAlgorithmConfig lfu = new LFUAlgorithmConfig(maxNodes, minNodes);
-      lfu.setMinTimeToLive(minTimeToLive);
-      // Create an eviction region config
-      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, lfu);
-
-      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
-      evictionConfig.setDefaultEvictionRegionConfig(erc);
-      return new LFUExoCache(config, cache, lfu);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public Class<? extends ExoCacheConfig> getExpectedConfigType()
-   {
-      return LFUExoCacheConfig.class;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public String getExpectedImplementation()
-   {
-      return EXPECTED_IMPL;
-   }
-
-   /**
-    * The LRU implementation of an ExoCache
-    */
-   public static class LFUExoCache extends AbstractExoCache<Serializable, Object>
-   {
-
-      private final LFUAlgorithmConfig lfu;
-
-      public LFUExoCache(ExoCacheConfig config, Cache<Serializable, Object> cache, LFUAlgorithmConfig lfu)
-      {
-         super(config, cache);
-         this.lfu = lfu;
-      }
-
-      @ManagedName("MinTimeToLive")
-      @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
-      public long getLiveTime()
-      {
-         return lfu.getMinTimeToLive();
-      }
-
-      @ManagedName("MaxNodes")
-      @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
-      public int getMaxSize()
-      {
-         return lfu.getMaxNodes();
-      }
-
-      @Managed
-      @ManagedName("MinNodes")
-      @ManagedDescription("This is the minimum number of nodes allowed in this region. This value determines what the eviction queue should prune down to per pass. e.g. If minNodes is 10 and the cache grows to 100 nodes, the cache is pruned down to the 10 most frequently used nodes when the eviction timer makes a pass through the eviction algorithm.")
-      public long getMinNodes()
-      {
-         return lfu.getMinNodes();
-      }
-
-      public void setLiveTime(long period)
-      {
-         lfu.setMinTimeToLive(period);
-      }
-
-      public void setMaxSize(int max)
-      {
-         lfu.setMaxNodes(max);
-      }
-
-      @Managed
-      public void setMinNodes(int minNodes)
-      {
-         lfu.setMinNodes(minNodes);
-      }
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,160 @@
+/*
+ * 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.cache.impl.jboss.lfu;
+
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.annotations.ManagedName;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
+import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
+import org.jboss.cache.Cache;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.EvictionConfig;
+import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.eviction.LFUAlgorithmConfig;
+
+import java.io.Serializable;
+
+/**
+ * The LFU Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class LFUExoCacheCreator implements ExoCacheCreator
+{
+
+   /**
+    * The expected implementation name
+    */
+   public static final String EXPECTED_IMPL = "LFU";
+
+   /**
+    * The default value for the parameter maxAge
+    */
+   protected int defaultMinNodes;
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
+   {
+      if (config instanceof LFUExoCacheConfig)
+      {
+         final LFUExoCacheConfig lfuConfig = (LFUExoCacheConfig)config;
+         return create(config, cache, lfuConfig.getMaxNodes(), lfuConfig.getMinNodes(), lfuConfig.getMinTimeToLive());
+      }
+      else
+      {
+         final long period = config.getLiveTime();
+         return create(config, cache, config.getMaxSize(), defaultMinNodes, period > 0 ? period * 1000 : 0);
+      }
+   }
+
+   /**
+    * Creates a new ExoCache instance with the relevant parameters
+    */
+   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, int minNodes,
+      long minTimeToLive) throws ExoCacheInitException
+   {
+      final Configuration configuration = cache.getConfiguration();
+      final LFUAlgorithmConfig lfu = new LFUAlgorithmConfig(maxNodes, minNodes);
+      lfu.setMinTimeToLive(minTimeToLive);
+      // Create an eviction region config
+      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, lfu);
+
+      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
+      evictionConfig.setDefaultEvictionRegionConfig(erc);
+      return new LFUExoCache(config, cache, lfu);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Class<? extends ExoCacheConfig> getExpectedConfigType()
+   {
+      return LFUExoCacheConfig.class;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getExpectedImplementation()
+   {
+      return EXPECTED_IMPL;
+   }
+
+   /**
+    * The LRU implementation of an ExoCache
+    */
+   public static class LFUExoCache extends AbstractExoCache<Serializable, Object>
+   {
+
+      private final LFUAlgorithmConfig lfu;
+
+      public LFUExoCache(ExoCacheConfig config, Cache<Serializable, Object> cache, LFUAlgorithmConfig lfu)
+      {
+         super(config, cache);
+         this.lfu = lfu;
+      }
+
+      @ManagedName("MinTimeToLive")
+      @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
+      public long getLiveTime()
+      {
+         return lfu.getMinTimeToLive();
+      }
+
+      @ManagedName("MaxNodes")
+      @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
+      public int getMaxSize()
+      {
+         return lfu.getMaxNodes();
+      }
+
+      @Managed
+      @ManagedName("MinNodes")
+      @ManagedDescription("This is the minimum number of nodes allowed in this region. This value determines what the eviction queue should prune down to per pass. e.g. If minNodes is 10 and the cache grows to 100 nodes, the cache is pruned down to the 10 most frequently used nodes when the eviction timer makes a pass through the eviction algorithm.")
+      public long getMinNodes()
+      {
+         return lfu.getMinNodes();
+      }
+
+      public void setLiveTime(long period)
+      {
+         lfu.setMinTimeToLive(period);
+      }
+
+      public void setMaxSize(int max)
+      {
+         lfu.setMaxNodes(max);
+      }
+
+      @Managed
+      public void setMinNodes(int minNodes)
+      {
+         lfu.setMinNodes(minNodes);
+      }
+   }
+}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,81 +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.cache.impl.jboss.lru;
-
-import org.exoplatform.services.cache.ExoCacheConfig;
-
-/**
- * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the LRU implementation
- * 
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class LRUExoCacheConfig extends ExoCacheConfig
-{
-
-   private int maxNodes;
-
-   private long timeToLive;
-
-   private long maxAge;
-
-   private long minTimeToLive;
-
-   public int getMaxNodes()
-   {
-      return maxNodes;
-   }
-
-   public void setMaxNodes(int maxNodes)
-   {
-      this.maxNodes = maxNodes;
-   }
-
-   public long getTimeToLive()
-   {
-      return timeToLive;
-   }
-
-   public void setTimeToLive(long timeToLive)
-   {
-      this.timeToLive = timeToLive;
-   }
-
-   public long getMaxAge()
-   {
-      return maxAge;
-   }
-
-   public void setMaxAge(long maxAge)
-   {
-      this.maxAge = maxAge;
-   }
-
-   public long getMinTimeToLive()
-   {
-      return minTimeToLive;
-   }
-
-   public void setMinTimeToLive(long minTimeToLive)
-   {
-      this.minTimeToLive = minTimeToLive;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,81 @@
+/*
+ * 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.cache.impl.jboss.lru;
+
+import org.exoplatform.services.cache.ExoCacheConfig;
+
+/**
+ * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the LRU implementation
+ * 
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class LRUExoCacheConfig extends ExoCacheConfig
+{
+
+   private int maxNodes;
+
+   private long timeToLive;
+
+   private long maxAge;
+
+   private long minTimeToLive;
+
+   public int getMaxNodes()
+   {
+      return maxNodes;
+   }
+
+   public void setMaxNodes(int maxNodes)
+   {
+      this.maxNodes = maxNodes;
+   }
+
+   public long getTimeToLive()
+   {
+      return timeToLive;
+   }
+
+   public void setTimeToLive(long timeToLive)
+   {
+      this.timeToLive = timeToLive;
+   }
+
+   public long getMaxAge()
+   {
+      return maxAge;
+   }
+
+   public void setMaxAge(long maxAge)
+   {
+      this.maxAge = maxAge;
+   }
+
+   public long getMinTimeToLive()
+   {
+      return minTimeToLive;
+   }
+
+   public void setMinTimeToLive(long minTimeToLive)
+   {
+      this.minTimeToLive = minTimeToLive;
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,181 +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.cache.impl.jboss.lru;
-
-import org.exoplatform.management.annotations.Managed;
-import org.exoplatform.management.annotations.ManagedDescription;
-import org.exoplatform.management.annotations.ManagedName;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
-import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
-import org.jboss.cache.Cache;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.EvictionConfig;
-import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.eviction.LRUAlgorithmConfig;
-
-import java.io.Serializable;
-
-/**
- * The LRU Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class LRUExoCacheCreator implements ExoCacheCreator
-{
-
-   /**
-    * The expected implementation name
-    */
-   public static final String EXPECTED_IMPL = "LRU";
-
-   /**
-    * The default value for the parameter timeToLive
-    */
-   protected long defaultTimeToLive;
-
-   /**
-    * The default value for the parameter maxAge
-    */
-   protected long defaultMaxAge;
-
-   /**
-    * {@inheritDoc}
-    */
-   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
-   {
-      if (config instanceof LRUExoCacheConfig)
-      {
-         final LRUExoCacheConfig lruConfig = (LRUExoCacheConfig)config;
-         return create(config, cache, lruConfig.getMaxNodes(), lruConfig.getTimeToLive(), lruConfig.getMaxAge(),
-            lruConfig.getMinTimeToLive());
-      }
-      else
-      {
-         final long period = config.getLiveTime();
-         return create(config, cache, config.getMaxSize(), defaultTimeToLive, defaultMaxAge, period > 0 ? period * 1000
-            : 0);
-      }
-   }
-
-   /**
-    * Creates a new ExoCache instance with the relevant parameters
-    */
-   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, long timeToLive,
-      long maxAge, long minTimeToLive) throws ExoCacheInitException
-   {
-      final Configuration configuration = cache.getConfiguration();
-      final LRUAlgorithmConfig lru = new LRUAlgorithmConfig(timeToLive, maxAge, maxNodes);
-      lru.setMinTimeToLive(minTimeToLive);
-      // Create an eviction region config
-      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, lru);
-
-      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
-      evictionConfig.setDefaultEvictionRegionConfig(erc);
-      return new LRUExoCache(config, cache, lru);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public Class<? extends ExoCacheConfig> getExpectedConfigType()
-   {
-      return LRUExoCacheConfig.class;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public String getExpectedImplementation()
-   {
-      return EXPECTED_IMPL;
-   }
-
-   /**
-    * The LRU implementation of an ExoCache
-    */
-   public static class LRUExoCache extends AbstractExoCache<Serializable, Object>
-   {
-
-      private final LRUAlgorithmConfig lru;
-
-      public LRUExoCache(ExoCacheConfig config, Cache<Serializable, Object> cache, LRUAlgorithmConfig lru)
-      {
-         super(config, cache);
-         this.lru = lru;
-      }
-
-      @ManagedName("MinTimeToLive")
-      @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
-      public long getLiveTime()
-      {
-         return lru.getMinTimeToLive();
-      }
-
-      @ManagedName("MaxNodes")
-      @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
-      public int getMaxSize()
-      {
-         return lru.getMaxNodes();
-      }
-
-      @Managed
-      @ManagedName("TimeToLive")
-      @ManagedDescription("The amount of time a node is not written to or read (in milliseconds) before the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
-      public long getTimeToLive()
-      {
-         return lru.getTimeToLive();
-      }
-
-      @Managed
-      @ManagedName("MaxAges")
-      @ManagedDescription("Lifespan of a node (in milliseconds) regardless of idle time before the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
-      public long getMaxAge()
-      {
-         return lru.getMaxAge();
-      }
-
-      public void setLiveTime(long period)
-      {
-         lru.setMinTimeToLive(period);
-      }
-
-      public void setMaxSize(int max)
-      {
-         lru.setMaxNodes(max);
-      }
-
-      @Managed
-      public void setTimeToLive(long timeToLive)
-      {
-         lru.setTimeToLive(timeToLive);
-      }
-
-      @Managed
-      public void setMaxAge(long maxAge)
-      {
-         lru.setMaxAge(maxAge);
-      }
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,181 @@
+/*
+ * 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.cache.impl.jboss.lru;
+
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.annotations.ManagedName;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
+import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
+import org.jboss.cache.Cache;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.EvictionConfig;
+import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.eviction.LRUAlgorithmConfig;
+
+import java.io.Serializable;
+
+/**
+ * The LRU Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class LRUExoCacheCreator implements ExoCacheCreator
+{
+
+   /**
+    * The expected implementation name
+    */
+   public static final String EXPECTED_IMPL = "LRU";
+
+   /**
+    * The default value for the parameter timeToLive
+    */
+   protected long defaultTimeToLive;
+
+   /**
+    * The default value for the parameter maxAge
+    */
+   protected long defaultMaxAge;
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
+   {
+      if (config instanceof LRUExoCacheConfig)
+      {
+         final LRUExoCacheConfig lruConfig = (LRUExoCacheConfig)config;
+         return create(config, cache, lruConfig.getMaxNodes(), lruConfig.getTimeToLive(), lruConfig.getMaxAge(),
+            lruConfig.getMinTimeToLive());
+      }
+      else
+      {
+         final long period = config.getLiveTime();
+         return create(config, cache, config.getMaxSize(), defaultTimeToLive, defaultMaxAge, period > 0 ? period * 1000
+            : 0);
+      }
+   }
+
+   /**
+    * Creates a new ExoCache instance with the relevant parameters
+    */
+   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, long timeToLive,
+      long maxAge, long minTimeToLive) throws ExoCacheInitException
+   {
+      final Configuration configuration = cache.getConfiguration();
+      final LRUAlgorithmConfig lru = new LRUAlgorithmConfig(timeToLive, maxAge, maxNodes);
+      lru.setMinTimeToLive(minTimeToLive);
+      // Create an eviction region config
+      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, lru);
+
+      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
+      evictionConfig.setDefaultEvictionRegionConfig(erc);
+      return new LRUExoCache(config, cache, lru);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Class<? extends ExoCacheConfig> getExpectedConfigType()
+   {
+      return LRUExoCacheConfig.class;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getExpectedImplementation()
+   {
+      return EXPECTED_IMPL;
+   }
+
+   /**
+    * The LRU implementation of an ExoCache
+    */
+   public static class LRUExoCache extends AbstractExoCache<Serializable, Object>
+   {
+
+      private final LRUAlgorithmConfig lru;
+
+      public LRUExoCache(ExoCacheConfig config, Cache<Serializable, Object> cache, LRUAlgorithmConfig lru)
+      {
+         super(config, cache);
+         this.lru = lru;
+      }
+
+      @ManagedName("MinTimeToLive")
+      @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
+      public long getLiveTime()
+      {
+         return lru.getMinTimeToLive();
+      }
+
+      @ManagedName("MaxNodes")
+      @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
+      public int getMaxSize()
+      {
+         return lru.getMaxNodes();
+      }
+
+      @Managed
+      @ManagedName("TimeToLive")
+      @ManagedDescription("The amount of time a node is not written to or read (in milliseconds) before the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
+      public long getTimeToLive()
+      {
+         return lru.getTimeToLive();
+      }
+
+      @Managed
+      @ManagedName("MaxAges")
+      @ManagedDescription("Lifespan of a node (in milliseconds) regardless of idle time before the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
+      public long getMaxAge()
+      {
+         return lru.getMaxAge();
+      }
+
+      public void setLiveTime(long period)
+      {
+         lru.setMinTimeToLive(period);
+      }
+
+      public void setMaxSize(int max)
+      {
+         lru.setMaxNodes(max);
+      }
+
+      @Managed
+      public void setTimeToLive(long timeToLive)
+      {
+         lru.setTimeToLive(timeToLive);
+      }
+
+      @Managed
+      public void setMaxAge(long maxAge)
+      {
+         lru.setMaxAge(maxAge);
+      }
+   }
+}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,57 +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.cache.impl.jboss.mru;
-
-import org.exoplatform.services.cache.ExoCacheConfig;
-
-/**
- * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the MRU implementation
- * 
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class MRUExoCacheConfig extends ExoCacheConfig
-{
-
-   private int maxNodes;
-
-   private long minTimeToLive;
-
-   public int getMaxNodes()
-   {
-      return maxNodes;
-   }
-
-   public void setMaxNodes(int maxNodes)
-   {
-      this.maxNodes = maxNodes;
-   }
-
-   public long getMinTimeToLive()
-   {
-      return minTimeToLive;
-   }
-
-   public void setMinTimeToLive(long minTimeToLive)
-   {
-      this.minTimeToLive = minTimeToLive;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -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.cache.impl.jboss.mru;
+
+import org.exoplatform.services.cache.ExoCacheConfig;
+
+/**
+ * The {@link org.exoplatform.services.cache.ExoCacheConfig} for the MRU implementation
+ * 
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class MRUExoCacheConfig extends ExoCacheConfig
+{
+
+   private int maxNodes;
+
+   private long minTimeToLive;
+
+   public int getMaxNodes()
+   {
+      return maxNodes;
+   }
+
+   public void setMaxNodes(int maxNodes)
+   {
+      this.maxNodes = maxNodes;
+   }
+
+   public long getMinTimeToLive()
+   {
+      return minTimeToLive;
+   }
+
+   public void setMinTimeToLive(long minTimeToLive)
+   {
+      this.minTimeToLive = minTimeToLive;
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,128 +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.cache.impl.jboss.mru;
-
-import org.exoplatform.management.annotations.ManagedDescription;
-import org.exoplatform.management.annotations.ManagedName;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
-import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
-import org.jboss.cache.Cache;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.EvictionConfig;
-import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.eviction.MRUAlgorithmConfig;
-
-import java.io.Serializable;
-
-/**
- * The MRU Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class MRUExoCacheCreator implements ExoCacheCreator
-{
-
-   /**
-    * The expected implementation name
-    */
-   public static final String EXPECTED_IMPL = "MRU";
-
-   /**
-    * {@inheritDoc}
-    */
-   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
-   {
-      if (config instanceof MRUExoCacheConfig)
-      {
-         final MRUExoCacheConfig mruConfig = (MRUExoCacheConfig)config;
-         return create(config, cache, mruConfig.getMaxNodes(), mruConfig.getMinTimeToLive());
-      }
-      else
-      {
-         final long period = config.getLiveTime();
-         return create(config, cache, config.getMaxSize(), period > 0 ? period * 1000 : 0);
-      }
-   }
-
-   /**
-    * Creates a new ExoCache instance with the relevant parameters
-    */
-   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, long minTimeToLive)
-      throws ExoCacheInitException
-   {
-      final Configuration configuration = cache.getConfiguration();
-      final MRUAlgorithmConfig mru = new MRUAlgorithmConfig(maxNodes);
-      mru.setMinTimeToLive(minTimeToLive);
-      // Create an eviction region config
-      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, mru);
-
-      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
-      evictionConfig.setDefaultEvictionRegionConfig(erc);
-
-      return new AbstractExoCache<Serializable, Object>(config, cache)
-      {
-
-         public void setMaxSize(int max)
-         {
-            mru.setMaxNodes(max);
-         }
-
-         public void setLiveTime(long period)
-         {
-            mru.setMinTimeToLive(period);
-         }
-
-         @ManagedName("MaxNodes")
-         @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
-         public int getMaxSize()
-         {
-            return mru.getMaxNodes();
-         }
-
-         @ManagedName("MinTimeToLive")
-         @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
-         public long getLiveTime()
-         {
-            return mru.getMinTimeToLive();
-         }
-      };
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public Class<? extends ExoCacheConfig> getExpectedConfigType()
-   {
-      return MRUExoCacheConfig.class;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public String getExpectedImplementation()
-   {
-      return EXPECTED_IMPL;
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -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.cache.impl.jboss.mru;
+
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.management.annotations.ManagedName;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.exoplatform.services.cache.impl.jboss.AbstractExoCache;
+import org.exoplatform.services.cache.impl.jboss.ExoCacheCreator;
+import org.jboss.cache.Cache;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.EvictionConfig;
+import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.eviction.MRUAlgorithmConfig;
+
+import java.io.Serializable;
+
+/**
+ * The MRU Implementation of an {@link org.exoplatform.services.cache.impl.jboss.ExoCacheCreator}
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class MRUExoCacheCreator implements ExoCacheCreator
+{
+
+   /**
+    * The expected implementation name
+    */
+   public static final String EXPECTED_IMPL = "MRU";
+
+   /**
+    * {@inheritDoc}
+    */
+   public ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
+   {
+      if (config instanceof MRUExoCacheConfig)
+      {
+         final MRUExoCacheConfig mruConfig = (MRUExoCacheConfig)config;
+         return create(config, cache, mruConfig.getMaxNodes(), mruConfig.getMinTimeToLive());
+      }
+      else
+      {
+         final long period = config.getLiveTime();
+         return create(config, cache, config.getMaxSize(), period > 0 ? period * 1000 : 0);
+      }
+   }
+
+   /**
+    * Creates a new ExoCache instance with the relevant parameters
+    */
+   private ExoCache<Serializable, Object> create(ExoCacheConfig config, Cache<Serializable, Object> cache, int maxNodes, long minTimeToLive)
+      throws ExoCacheInitException
+   {
+      final Configuration configuration = cache.getConfiguration();
+      final MRUAlgorithmConfig mru = new MRUAlgorithmConfig(maxNodes);
+      mru.setMinTimeToLive(minTimeToLive);
+      // Create an eviction region config
+      final EvictionRegionConfig erc = new EvictionRegionConfig(Fqn.ROOT, mru);
+
+      final EvictionConfig evictionConfig = configuration.getEvictionConfig();
+      evictionConfig.setDefaultEvictionRegionConfig(erc);
+
+      return new AbstractExoCache<Serializable, Object>(config, cache)
+      {
+
+         public void setMaxSize(int max)
+         {
+            mru.setMaxNodes(max);
+         }
+
+         public void setLiveTime(long period)
+         {
+            mru.setMinTimeToLive(period);
+         }
+
+         @ManagedName("MaxNodes")
+         @ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, -1 denotes no limit.")
+         public int getMaxSize()
+         {
+            return mru.getMaxNodes();
+         }
+
+         @ManagedName("MinTimeToLive")
+         @ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, which is the default value.")
+         public long getLiveTime()
+         {
+            return mru.getMinTimeToLive();
+         }
+      };
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public Class<? extends ExoCacheConfig> getExpectedConfigType()
+   {
+      return MRUExoCacheConfig.class;
+   }
+
+   /**
+    * {@inheritDoc}
+    */
+   public String getExpectedImplementation()
+   {
+      return EXPECTED_IMPL;
+   }
+}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,101 +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.
-
--->
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
-
-   <!--
-      isolation levels supported: READ_COMMITTED and REPEATABLE_READ nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic (deprecated)
-   -->
-   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="mvcc"
-      writeSkewCheck="false" concurrencyLevel="500" />
-
-   <!--
-      Used to register a transaction manager and participate in ongoing
-      transactions.
-   -->
-   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" syncRollbackPhase="false"
-      syncCommitPhase="false" />
-
-
-   <!--
-      Used to register JMX statistics in any available MBean server
-   -->
-   <jmxStatistics enabled="false" />
-
-   <!--
-      If region based marshalling is used, defines whether new regions are
-      inactive on startup.
-   -->
-   <startup regionsInactiveOnStartup="true" />
-
-   <!--
-      Used to register JVM shutdown hooks. hookBehavior: DEFAULT, REGISTER,
-      DONT_REGISTER
-   -->
-   <shutdown hookBehavior="DEFAULT" />
-
-   <!--
-      Used to define async listener notification thread pool size
-   -->
-   <listeners asyncPoolSize="1" asyncQueueSize="100000" />
-
-   <!--
-      Used to enable invocation batching and allow the use of
-      Cache.startBatch()/endBatch() methods.
-   -->
-   <invocationBatching enabled="true" />
-
-
-   <!--
-      This element specifies that the cache is clustered. modes supported:
-      replication (r) or invalidation (i).
-   -->
-   <clustering mode="replication" clusterName="JBossCache-cluster">
-
-      <!--
-         Defines whether to retrieve state on startup
-      -->
-      <stateRetrieval timeout="20000" fetchInMemoryState="false" />
-
-      <!--
-         Network calls are synchronous.
-      -->
-      <sync replTimeout="20000" />
-
-      <!--
-         Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml ships with jgroups.jar and will be picked up by
-         the class loader.
-      -->
-      <jgroupsConfig configFile="udp.xml">
-      </jgroupsConfig>
-   </clustering>
-
-   <!--
-      Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means the eviction thread will never run.
-   -->
-   <eviction wakeUpInterval="5000">
-      <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="200000">
-         <property name="maxNodes" value="3000" />
-         <property name="timeToLive" value="0" />
-      </default>
-   </eviction>
-</jbosscache>
-

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/cache-configuration-template.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,101 @@
+<?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.
+
+-->
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+
+   <!--
+      isolation levels supported: READ_COMMITTED and REPEATABLE_READ nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic (deprecated)
+   -->
+   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="mvcc"
+      writeSkewCheck="false" concurrencyLevel="500" />
+
+   <!--
+      Used to register a transaction manager and participate in ongoing
+      transactions.
+   -->
+   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" syncRollbackPhase="false"
+      syncCommitPhase="false" />
+
+
+   <!--
+      Used to register JMX statistics in any available MBean server
+   -->
+   <jmxStatistics enabled="false" />
+
+   <!--
+      If region based marshalling is used, defines whether new regions are
+      inactive on startup.
+   -->
+   <startup regionsInactiveOnStartup="true" />
+
+   <!--
+      Used to register JVM shutdown hooks. hookBehavior: DEFAULT, REGISTER,
+      DONT_REGISTER
+   -->
+   <shutdown hookBehavior="DEFAULT" />
+
+   <!--
+      Used to define async listener notification thread pool size
+   -->
+   <listeners asyncPoolSize="1" asyncQueueSize="100000" />
+
+   <!--
+      Used to enable invocation batching and allow the use of
+      Cache.startBatch()/endBatch() methods.
+   -->
+   <invocationBatching enabled="true" />
+
+
+   <!--
+      This element specifies that the cache is clustered. modes supported:
+      replication (r) or invalidation (i).
+   -->
+   <clustering mode="replication" clusterName="JBossCache-cluster">
+
+      <!--
+         Defines whether to retrieve state on startup
+      -->
+      <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+
+      <!--
+         Network calls are synchronous.
+      -->
+      <sync replTimeout="20000" />
+
+      <!--
+         Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml ships with jgroups.jar and will be picked up by
+         the class loader.
+      -->
+      <jgroupsConfig configFile="udp.xml">
+      </jgroupsConfig>
+   </clustering>
+
+   <!--
+      Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means the eviction thread will never run.
+   -->
+   <eviction wakeUpInterval="5000">
+      <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="200000">
+         <property name="maxNodes" value="3000" />
+         <property name="timeToLive" value="0" />
+      </default>
+   </eviction>
+</jbosscache>
+

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,34 +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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-   <component>
-      <key>org.exoplatform.services.cache.ExoCacheFactory</key>
-      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
-      <init-params>
-         <value-param>
-            <name>cache.config.template</name>
-            <value>jar:/conf/portal/cache-configuration-template.xml</value>
-         </value-param>
-      </init-params>
-   </component>
-</configuration>

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/resources/conf/portal/configuration.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,34 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+   <component>
+      <key>org.exoplatform.services.cache.ExoCacheFactory</key>
+      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
+      <init-params>
+         <value-param>
+            <name>cache.config.template</name>
+            <value>jar:/conf/portal/cache-configuration-template.xml</value>
+         </value-param>
+      </init-params>
+   </component>
+</configuration>

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,678 +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.cache.impl.jboss;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.cache.CacheListener;
-import org.exoplatform.services.cache.CacheListenerContext;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.CachedObjectSelector;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheFactory;
-import org.exoplatform.services.cache.ObjectCacheInfo;
-import org.exoplatform.test.BasicTestCase;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class TestAbstractExoCache extends BasicTestCase
-{
-
-   CacheService service;
-
-   AbstractExoCache<Serializable, Object> cache;
-
-   ExoCacheFactory factory;
-
-   public TestAbstractExoCache(String name)
-   {
-      super(name);
-   }
-
-   public void setUp() throws Exception
-   {
-      this.service = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
-      this.cache = (AbstractExoCache<Serializable, Object>)service.getCacheInstance("myCache");
-      this.factory = (ExoCacheFactory)PortalContainer.getInstance().getComponentInstanceOfType(ExoCacheFactory.class);
-   }
-
-   protected void tearDown() throws Exception
-   {
-      cache.clearCache();
-   }
-
-   public void testPut() throws Exception
-   {
-      cache.put(new MyKey("a"), "a");
-      cache.put(new MyKey("b"), "b");
-      cache.put(new MyKey("c"), "c");
-      assertEquals(3, cache.getCacheSize());
-      cache.put(new MyKey("a"), "c");
-      assertEquals(3, cache.getCacheSize());
-      cache.put(new MyKey("d"), "c");
-      assertEquals(4, cache.getCacheSize());
-   }
-
-   public void testClearCache() throws Exception
-   {
-      cache.put(new MyKey("a"), "a");
-      cache.put(new MyKey("b"), "b");
-      cache.put(new MyKey("c"), "c");
-      assertTrue(cache.getCacheSize() > 0);
-      cache.clearCache();
-      assertTrue(cache.getCacheSize() == 0);
-   }
-
-   public void testGet() throws Exception
-   {
-      cache.put(new MyKey("a"), "a");
-      assertEquals("a", cache.get(new MyKey("a")));
-      cache.put(new MyKey("a"), "c");
-      assertEquals("c", cache.get(new MyKey("a")));
-      cache.remove(new MyKey("a"));
-      assertEquals(null, cache.get(new MyKey("a")));
-      assertEquals(null, cache.get(new MyKey("x")));
-   }
-
-   public void testRemove() throws Exception
-   {
-      cache.put(new MyKey("a"), 1);
-      cache.put(new MyKey("b"), 2);
-      cache.put(new MyKey("c"), 3);
-      assertEquals(3, cache.getCacheSize());
-      assertEquals(1, cache.remove(new MyKey("a")));
-      assertEquals(2, cache.getCacheSize());
-      assertEquals(2, cache.remove(new MyKey("b")));
-      assertEquals(1, cache.getCacheSize());
-      assertEquals(null, cache.remove(new MyKey("x")));
-      assertEquals(1, cache.getCacheSize());
-   }
-
-   public void testPutMap() throws Exception
-   {
-      Map<Serializable, Object> values = new HashMap<Serializable, Object>();
-      values.put(new MyKey("a"), "a");
-      values.put(new MyKey("b"), "b");
-      assertEquals(0, cache.getCacheSize());
-      cache.putMap(values);
-      assertEquals(2, cache.getCacheSize());
-      values = new HashMap<Serializable, Object>()
-      {
-         private static final long serialVersionUID = 1L;
-
-         public Set<Entry<Serializable, Object>> entrySet()
-         {
-            Set<Entry<Serializable, Object>> set = new LinkedHashSet<Entry<Serializable, Object>>(super.entrySet());
-            set.add(new Entry<Serializable, Object>()
-            {
-
-               public Object setValue(Object paramV)
-               {
-                  return null;
-               }
-
-               public Object getValue()
-               {
-                  throw new RuntimeException("An exception");
-               }
-
-               public Serializable getKey()
-               {
-                  return "c";
-               }
-            });
-            return set;
-         }
-      };
-      values.put(new MyKey("e"), "e");
-      values.put(new MyKey("d"), "d");
-      cache.putMap(values);
-      assertEquals(2, cache.getCacheSize());
-   }
-
-   public void testGetCachedObjects() throws Exception
-   {
-      cache.put(new MyKey("a"), "a");
-      cache.put(new MyKey("b"), "b");
-      cache.put(new MyKey("c"), "c");
-      cache.put(new MyKey("d"), null);
-      assertEquals(4, cache.getCacheSize());
-      List<Object> values = cache.getCachedObjects();
-      assertEquals(3, values.size());
-      assertTrue(values.contains("a"));
-      assertTrue(values.contains("b"));
-      assertTrue(values.contains("c"));
-   }
-
-   public void testRemoveCachedObjects() throws Exception
-   {
-      cache.put(new MyKey("a"), "a");
-      cache.put(new MyKey("b"), "b");
-      cache.put(new MyKey("c"), "c");
-      cache.put(new MyKey("d"), null);
-      assertEquals(4, cache.getCacheSize());
-      List<Object> values = cache.removeCachedObjects();
-      assertEquals(3, values.size());
-      assertTrue(values.contains("a"));
-      assertTrue(values.contains("b"));
-      assertTrue(values.contains("c"));
-      assertEquals(0, cache.getCacheSize());
-   }
-
-   public void testSelect() throws Exception
-   {
-      cache.put(new MyKey("a"), 1);
-      cache.put(new MyKey("b"), 2);
-      cache.put(new MyKey("c"), 3);
-      final AtomicInteger count = new AtomicInteger();
-      CachedObjectSelector<Serializable, Object> selector = new CachedObjectSelector<Serializable, Object>()
-      {
-
-         public void onSelect(ExoCache<? extends Serializable, ? extends Object> cache, Serializable key, ObjectCacheInfo<? extends Object> ocinfo) throws Exception
-         {
-            assertTrue(key.equals(new MyKey("a")) || key.equals(new MyKey("b")) || key.equals(new MyKey("c")));
-            assertTrue(ocinfo.get().equals(1) || ocinfo.get().equals(2) || ocinfo.get().equals(3));
-            count.incrementAndGet();
-         }
-
-         public boolean select(Serializable key, ObjectCacheInfo<? extends Object> ocinfo)
-         {
-            return true;
-         }
-      };
-      cache.select(selector);
-      assertEquals(3, count.intValue());
-   }
-
-   public void testGetHitsNMisses() throws Exception
-   {
-      int hits = cache.getCacheHit();
-      int misses = cache.getCacheMiss();
-      cache.put(new MyKey("a"), "a");
-      cache.get(new MyKey("a"));
-      cache.remove(new MyKey("a"));
-      cache.get(new MyKey("a"));
-      cache.get(new MyKey("z"));
-      assertEquals(1, cache.getCacheHit() - hits);
-      assertEquals(2, cache.getCacheMiss() - misses);
-   }
-
-   @SuppressWarnings("unchecked")
-   public void testDistributedCache() throws Exception
-   {
-      System.out.println("WARNING: For Linux distributions the following JVM parameter must be set to true, java.net.preferIPv4Stack = " + System.getProperty("java.net.preferIPv4Stack"));
-      ExoCacheConfig config = new ExoCacheConfig();
-      config.setName("MyCacheDistributed");
-      config.setMaxSize(5);
-      config.setLiveTime(1000);
-      config.setDistributed(true);
-      ExoCacheConfig config2 = new ExoCacheConfig();
-      config2.setName("MyCacheDistributed2");
-      config2.setMaxSize(5);
-      config2.setLiveTime(1000);
-      config2.setDistributed(true);
-      AbstractExoCache<Serializable, Object> cache1 = (AbstractExoCache<Serializable, Object>)factory.createCache(config);
-      MyCacheListener listener1 = new MyCacheListener();
-      cache1.addCacheListener(listener1);
-      AbstractExoCache<Serializable, Object> cache2 = (AbstractExoCache<Serializable, Object>)factory.createCache(config);
-      MyCacheListener listener2 = new MyCacheListener();
-      cache2.addCacheListener(listener2);
-      AbstractExoCache<Serializable, Object> cache3 = (AbstractExoCache<Serializable, Object>)factory.createCache(config2);
-      MyCacheListener listener3 = new MyCacheListener();
-      cache3.addCacheListener(listener3);
-      try
-      {
-         cache1.put(new MyKey("a"), "b");
-         assertEquals(1, cache1.getCacheSize());
-         assertEquals("b", cache2.get(new MyKey("a")));
-         assertEquals(1, cache2.getCacheSize());
-         assertEquals(0, cache3.getCacheSize());
-         assertEquals(1, listener1.put);
-         assertEquals(1, listener2.put);
-         assertEquals(0, listener3.put);
-         assertEquals(0, listener1.get);
-         assertEquals(1, listener2.get);
-         assertEquals(0, listener3.get);
-         cache2.put(new MyKey("b"), "c");
-         assertEquals(2, cache1.getCacheSize());
-         assertEquals(2, cache2.getCacheSize());
-         assertEquals("c", cache1.get(new MyKey("b")));
-         assertEquals(0, cache3.getCacheSize());
-         assertEquals(2, listener1.put);
-         assertEquals(2, listener2.put);
-         assertEquals(0, listener3.put);
-         assertEquals(1, listener1.get);
-         assertEquals(1, listener2.get);
-         assertEquals(0, listener3.get);
-         cache3.put(new MyKey("c"), "d");
-         assertEquals(2, cache1.getCacheSize());
-         assertEquals(2, cache2.getCacheSize());
-         assertEquals(1, cache3.getCacheSize());
-         assertEquals("d", cache3.get(new MyKey("c")));
-         assertEquals(2, listener1.put);
-         assertEquals(2, listener2.put);
-         assertEquals(1, listener3.put);
-         assertEquals(1, listener1.get);
-         assertEquals(1, listener2.get);
-         assertEquals(1, listener3.get);
-         cache2.put(new MyKey("a"), "a");
-         assertEquals(2, cache1.getCacheSize());
-         assertEquals(2, cache2.getCacheSize());
-         assertEquals("a", cache1.get(new MyKey("a")));
-         assertEquals(3, listener1.put);
-         assertEquals(3, listener2.put);
-         assertEquals(1, listener3.put);
-         assertEquals(2, listener1.get);
-         assertEquals(1, listener2.get);
-         assertEquals(1, listener3.get);
-         cache2.remove(new MyKey("a"));
-         assertEquals(1, cache1.getCacheSize());
-         assertEquals(1, cache2.getCacheSize());
-         assertEquals(3, listener1.put);
-         assertEquals(3, listener2.put);
-         assertEquals(1, listener3.put);
-         assertEquals(2, listener1.get);
-         assertEquals(1, listener2.get);
-         assertEquals(1, listener3.get);
-         assertEquals(1, listener1.remove);
-         assertEquals(1, listener2.remove);
-         assertEquals(0, listener3.remove);
-         cache1.clearCache();
-         assertEquals(0, cache1.getCacheSize());
-         assertEquals(null, cache2.get(new MyKey("b")));
-         assertEquals(0, cache2.getCacheSize());
-         assertEquals(3, listener1.put);
-         assertEquals(3, listener2.put);
-         assertEquals(1, listener3.put);
-         assertEquals(2, listener1.get);
-         assertEquals(2, listener2.get);
-         assertEquals(1, listener3.get);
-         assertEquals(2, listener1.remove);
-         assertEquals(2, listener2.remove);
-         assertEquals(0, listener3.remove);
-         assertEquals(1, listener1.clearCache);
-         assertEquals(0, listener2.clearCache);
-         assertEquals(0, listener3.clearCache);
-         Map<Serializable, Object> values = new HashMap<Serializable, Object>();
-         values.put(new MyKey("a"), "a");
-         values.put(new MyKey("b"), "b");
-         cache1.putMap(values);
-         assertEquals(2, cache1.getCacheSize());
-         Thread.sleep(40);
-         assertEquals("a", cache2.get(new MyKey("a")));
-         assertEquals("b", cache2.get(new MyKey("b")));
-         assertEquals(2, cache2.getCacheSize());
-         assertEquals(5, listener1.put);
-         assertEquals(5, listener2.put);
-         assertEquals(1, listener3.put);
-         assertEquals(2, listener1.get);
-         assertEquals(4, listener2.get);
-         assertEquals(1, listener3.get);
-         assertEquals(2, listener1.remove);
-         assertEquals(2, listener2.remove);
-         assertEquals(0, listener3.remove);
-         assertEquals(1, listener1.clearCache);
-         assertEquals(0, listener2.clearCache);
-         assertEquals(0, listener3.clearCache);
-         values = new HashMap<Serializable, Object>()
-         {
-            private static final long serialVersionUID = 1L;
-
-            public Set<Entry<Serializable, Object>> entrySet()
-            {
-               Set<Entry<Serializable, Object>> set = new LinkedHashSet<Entry<Serializable, Object>>(super.entrySet());
-               set.add(new Entry<Serializable, Object>()
-               {
-
-                  public Object setValue(Object paramV)
-                  {
-                     return null;
-                  }
-
-                  public Object getValue()
-                  {
-                     throw new RuntimeException("An exception");
-                  }
-
-                  public Serializable getKey()
-                  {
-                     return "c";
-                  }
-               });
-               return set;
-            }
-         };
-         values.put(new MyKey("e"), "e");
-         values.put(new MyKey("d"), "d");
-         cache1.putMap(values);
-         assertEquals(2, cache1.getCacheSize());
-         assertEquals(2, cache2.getCacheSize());
-         assertEquals(5, listener1.put);
-         assertEquals(5, listener2.put);
-         assertEquals(1, listener3.put);
-         assertEquals(2, listener1.get);
-         assertEquals(4, listener2.get);
-         assertEquals(1, listener3.get);
-         assertEquals(2, listener1.remove);
-         assertEquals(2, listener2.remove);
-         assertEquals(0, listener3.remove);
-         assertEquals(1, listener1.clearCache);
-         assertEquals(0, listener2.clearCache);
-         assertEquals(0, listener3.clearCache);
-      }
-      finally
-      {
-         cache1.cache.stop();
-         cache2.cache.stop();
-         cache3.cache.stop();
-      }
-   }
-
-   public void testMultiThreading() throws Exception
-   {
-      long time = System.currentTimeMillis();
-      final ExoCache<Serializable, Object> cache = service.getCacheInstance("test-multi-threading");
-      final int totalElement = 100;
-      final int totalTimes = 20;
-      int reader = 20;
-      int writer = 10;
-      int remover = 5;
-      int cleaner = 1;
-      final CountDownLatch startSignalWriter = new CountDownLatch(1);
-      final CountDownLatch startSignalOthers = new CountDownLatch(1);
-      final CountDownLatch doneSignal = new CountDownLatch(reader + writer + remover);
-      final List<Exception> errors = Collections.synchronizedList(new ArrayList<Exception>());
-      for (int i = 0; i < writer; i++)
-      {
-         final int index = i;
-         Thread thread = new Thread()
-         {
-            public void run()
-            {
-               try
-               {
-                  startSignalWriter.await();
-                  for (int j = 0; j < totalTimes; j++)
-                  {
-                     for (int i = 0; i < totalElement; i++)
-                     {
-                        cache.put(new MyKey("key" + i), "value" + i);
-                     }
-                     if (index == 0 && j == 0)
-                     {
-                        // The cache is full, we can launch the others
-                        startSignalOthers.countDown();
-                     }
-                     sleep(50);
-                  }
-               }
-               catch (Exception e)
-               {
-                  errors.add(e);
-               }
-               finally
-               {
-                  doneSignal.countDown();
-               }
-            }
-         };
-         thread.start();
-      }
-      startSignalWriter.countDown();
-      for (int i = 0; i < reader; i++)
-      {
-         Thread thread = new Thread()
-         {
-            public void run()
-            {
-               try
-               {
-                  startSignalOthers.await();
-                  for (int j = 0; j < totalTimes; j++)
-                  {
-                     for (int i = 0; i < totalElement; i++)
-                     {
-                        cache.get(new MyKey("key" + i));
-                     }
-                     sleep(50);
-                  }
-               }
-               catch (Exception e)
-               {
-                  errors.add(e);
-               }
-               finally
-               {
-                  doneSignal.countDown();
-               }
-            }
-         };
-         thread.start();
-      }
-      for (int i = 0; i < remover; i++)
-      {
-         Thread thread = new Thread()
-         {
-            public void run()
-            {
-               try
-               {
-                  startSignalOthers.await();
-                  for (int j = 0; j < totalTimes; j++)
-                  {
-                     for (int i = 0; i < totalElement; i++)
-                     {
-                        cache.remove(new MyKey("key" + i));
-                     }
-                     sleep(50);
-                  }
-               }
-               catch (Exception e)
-               {
-                  errors.add(e);
-               }
-               finally
-               {
-                  doneSignal.countDown();
-               }
-            }
-         };
-         thread.start();
-      }
-      doneSignal.await();
-      for (int i = 0; i < totalElement; i++)
-      {
-         cache.put(new MyKey("key" + i), "value" + i);
-      }
-      assertEquals(totalElement, cache.getCacheSize());
-      final CountDownLatch startSignal = new CountDownLatch(1);
-      final CountDownLatch doneSignal2 = new CountDownLatch(writer + cleaner);
-      for (int i = 0; i < writer; i++)
-      {
-         Thread thread = new Thread()
-         {
-            public void run()
-            {
-               try
-               {
-                  startSignal.await();
-                  for (int j = 0; j < totalTimes; j++)
-                  {
-                     for (int i = 0; i < totalElement; i++)
-                     {
-                        cache.put(new MyKey("key" + i), "value" + i);
-                     }
-                     sleep(50);
-                  }
-               }
-               catch (Exception e)
-               {
-                  errors.add(e);
-               }
-               finally
-               {
-                  doneSignal2.countDown();
-               }
-            }
-         };
-         thread.start();
-      }
-      for (int i = 0; i < cleaner; i++)
-      {
-         Thread thread = new Thread()
-         {
-            public void run()
-            {
-               try
-               {
-                  startSignal.await();
-                  for (int j = 0; j < totalTimes; j++)
-                  {
-                     sleep(150);
-                     cache.clearCache();
-                  }
-               }
-               catch (Exception e)
-               {
-                  errors.add(e);
-               }
-               finally
-               {
-                  doneSignal2.countDown();
-               }
-            }
-         };
-         thread.start();
-      }
-      cache.clearCache();
-      assertEquals(0, cache.getCacheSize());
-      if (!errors.isEmpty())
-      {
-         for (Exception e : errors)
-         {
-            e.printStackTrace();
-         }
-         throw errors.get(0);
-      }
-      System.out.println("Total Time = " + (System.currentTimeMillis() - time));
-   }
-
-   public static class MyCacheListener implements CacheListener<Serializable, Object>
-   {
-
-      public int clearCache;
-
-      public int expire;
-
-      public int get;
-
-      public int put;
-
-      public int remove;
-
-      public void onClearCache(ExoCache<Serializable, Object> cache) throws Exception
-      {
-         clearCache++;
-      }
-
-      public void onExpire(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
-      {
-         expire++;
-      }
-
-      public void onGet(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
-      {
-         get++;
-      }
-
-      public void onPut(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
-      {
-         put++;
-      }
-
-      public void onRemove(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
-      {
-         remove++;
-      }
-
-      public void onClearCache(CacheListenerContext context) throws Exception
-      {
-         clearCache++;
-      }
-
-      public void onExpire(CacheListenerContext context, Serializable key, Object obj) throws Exception
-      {
-         expire++;
-      }
-
-      public void onGet(CacheListenerContext context, Serializable key, Object obj) throws Exception
-      {
-         get++;
-      }
-
-      public void onPut(CacheListenerContext context, Serializable key, Object obj) throws Exception
-      {
-         put++;
-      }
-
-      public void onRemove(CacheListenerContext context, Serializable key, Object obj) throws Exception
-      {
-         remove++;
-      }
-   }
-
-   public static class MyKey implements Serializable
-   {
-      private static final long serialVersionUID = 1L;
-      public String value;
-
-      public MyKey(String value)
-      {
-         this.value = value;
-      }
-
-      @Override
-      public boolean equals(Object paramObject)
-      {
-         return paramObject instanceof MyKey && ((MyKey)paramObject).value.endsWith(value);
-      }
-
-      @Override
-      public int hashCode()
-      {
-         return value.hashCode();
-      }
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestAbstractExoCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,678 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.services.cache.CacheListener;
+import org.exoplatform.services.cache.CacheListenerContext;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.CachedObjectSelector;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheFactory;
+import org.exoplatform.services.cache.ObjectCacheInfo;
+import org.exoplatform.test.BasicTestCase;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class TestAbstractExoCache extends BasicTestCase
+{
+
+   CacheService service;
+
+   AbstractExoCache<Serializable, Object> cache;
+
+   ExoCacheFactory factory;
+
+   public TestAbstractExoCache(String name)
+   {
+      super(name);
+   }
+
+   public void setUp() throws Exception
+   {
+      this.service = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
+      this.cache = (AbstractExoCache<Serializable, Object>)service.getCacheInstance("myCache");
+      this.factory = (ExoCacheFactory)PortalContainer.getInstance().getComponentInstanceOfType(ExoCacheFactory.class);
+   }
+
+   protected void tearDown() throws Exception
+   {
+      cache.clearCache();
+   }
+
+   public void testPut() throws Exception
+   {
+      cache.put(new MyKey("a"), "a");
+      cache.put(new MyKey("b"), "b");
+      cache.put(new MyKey("c"), "c");
+      assertEquals(3, cache.getCacheSize());
+      cache.put(new MyKey("a"), "c");
+      assertEquals(3, cache.getCacheSize());
+      cache.put(new MyKey("d"), "c");
+      assertEquals(4, cache.getCacheSize());
+   }
+
+   public void testClearCache() throws Exception
+   {
+      cache.put(new MyKey("a"), "a");
+      cache.put(new MyKey("b"), "b");
+      cache.put(new MyKey("c"), "c");
+      assertTrue(cache.getCacheSize() > 0);
+      cache.clearCache();
+      assertTrue(cache.getCacheSize() == 0);
+   }
+
+   public void testGet() throws Exception
+   {
+      cache.put(new MyKey("a"), "a");
+      assertEquals("a", cache.get(new MyKey("a")));
+      cache.put(new MyKey("a"), "c");
+      assertEquals("c", cache.get(new MyKey("a")));
+      cache.remove(new MyKey("a"));
+      assertEquals(null, cache.get(new MyKey("a")));
+      assertEquals(null, cache.get(new MyKey("x")));
+   }
+
+   public void testRemove() throws Exception
+   {
+      cache.put(new MyKey("a"), 1);
+      cache.put(new MyKey("b"), 2);
+      cache.put(new MyKey("c"), 3);
+      assertEquals(3, cache.getCacheSize());
+      assertEquals(1, cache.remove(new MyKey("a")));
+      assertEquals(2, cache.getCacheSize());
+      assertEquals(2, cache.remove(new MyKey("b")));
+      assertEquals(1, cache.getCacheSize());
+      assertEquals(null, cache.remove(new MyKey("x")));
+      assertEquals(1, cache.getCacheSize());
+   }
+
+   public void testPutMap() throws Exception
+   {
+      Map<Serializable, Object> values = new HashMap<Serializable, Object>();
+      values.put(new MyKey("a"), "a");
+      values.put(new MyKey("b"), "b");
+      assertEquals(0, cache.getCacheSize());
+      cache.putMap(values);
+      assertEquals(2, cache.getCacheSize());
+      values = new HashMap<Serializable, Object>()
+      {
+         private static final long serialVersionUID = 1L;
+
+         public Set<Entry<Serializable, Object>> entrySet()
+         {
+            Set<Entry<Serializable, Object>> set = new LinkedHashSet<Entry<Serializable, Object>>(super.entrySet());
+            set.add(new Entry<Serializable, Object>()
+            {
+
+               public Object setValue(Object paramV)
+               {
+                  return null;
+               }
+
+               public Object getValue()
+               {
+                  throw new RuntimeException("An exception");
+               }
+
+               public Serializable getKey()
+               {
+                  return "c";
+               }
+            });
+            return set;
+         }
+      };
+      values.put(new MyKey("e"), "e");
+      values.put(new MyKey("d"), "d");
+      cache.putMap(values);
+      assertEquals(2, cache.getCacheSize());
+   }
+
+   public void testGetCachedObjects() throws Exception
+   {
+      cache.put(new MyKey("a"), "a");
+      cache.put(new MyKey("b"), "b");
+      cache.put(new MyKey("c"), "c");
+      cache.put(new MyKey("d"), null);
+      assertEquals(4, cache.getCacheSize());
+      List<Object> values = cache.getCachedObjects();
+      assertEquals(3, values.size());
+      assertTrue(values.contains("a"));
+      assertTrue(values.contains("b"));
+      assertTrue(values.contains("c"));
+   }
+
+   public void testRemoveCachedObjects() throws Exception
+   {
+      cache.put(new MyKey("a"), "a");
+      cache.put(new MyKey("b"), "b");
+      cache.put(new MyKey("c"), "c");
+      cache.put(new MyKey("d"), null);
+      assertEquals(4, cache.getCacheSize());
+      List<Object> values = cache.removeCachedObjects();
+      assertEquals(3, values.size());
+      assertTrue(values.contains("a"));
+      assertTrue(values.contains("b"));
+      assertTrue(values.contains("c"));
+      assertEquals(0, cache.getCacheSize());
+   }
+
+   public void testSelect() throws Exception
+   {
+      cache.put(new MyKey("a"), 1);
+      cache.put(new MyKey("b"), 2);
+      cache.put(new MyKey("c"), 3);
+      final AtomicInteger count = new AtomicInteger();
+      CachedObjectSelector<Serializable, Object> selector = new CachedObjectSelector<Serializable, Object>()
+      {
+
+         public void onSelect(ExoCache<? extends Serializable, ? extends Object> cache, Serializable key, ObjectCacheInfo<? extends Object> ocinfo) throws Exception
+         {
+            assertTrue(key.equals(new MyKey("a")) || key.equals(new MyKey("b")) || key.equals(new MyKey("c")));
+            assertTrue(ocinfo.get().equals(1) || ocinfo.get().equals(2) || ocinfo.get().equals(3));
+            count.incrementAndGet();
+         }
+
+         public boolean select(Serializable key, ObjectCacheInfo<? extends Object> ocinfo)
+         {
+            return true;
+         }
+      };
+      cache.select(selector);
+      assertEquals(3, count.intValue());
+   }
+
+   public void testGetHitsNMisses() throws Exception
+   {
+      int hits = cache.getCacheHit();
+      int misses = cache.getCacheMiss();
+      cache.put(new MyKey("a"), "a");
+      cache.get(new MyKey("a"));
+      cache.remove(new MyKey("a"));
+      cache.get(new MyKey("a"));
+      cache.get(new MyKey("z"));
+      assertEquals(1, cache.getCacheHit() - hits);
+      assertEquals(2, cache.getCacheMiss() - misses);
+   }
+
+   @SuppressWarnings("unchecked")
+   public void testDistributedCache() throws Exception
+   {
+      System.out.println("WARNING: For Linux distributions the following JVM parameter must be set to true, java.net.preferIPv4Stack = " + System.getProperty("java.net.preferIPv4Stack"));
+      ExoCacheConfig config = new ExoCacheConfig();
+      config.setName("MyCacheDistributed");
+      config.setMaxSize(5);
+      config.setLiveTime(1000);
+      config.setDistributed(true);
+      ExoCacheConfig config2 = new ExoCacheConfig();
+      config2.setName("MyCacheDistributed2");
+      config2.setMaxSize(5);
+      config2.setLiveTime(1000);
+      config2.setDistributed(true);
+      AbstractExoCache<Serializable, Object> cache1 = (AbstractExoCache<Serializable, Object>)factory.createCache(config);
+      MyCacheListener listener1 = new MyCacheListener();
+      cache1.addCacheListener(listener1);
+      AbstractExoCache<Serializable, Object> cache2 = (AbstractExoCache<Serializable, Object>)factory.createCache(config);
+      MyCacheListener listener2 = new MyCacheListener();
+      cache2.addCacheListener(listener2);
+      AbstractExoCache<Serializable, Object> cache3 = (AbstractExoCache<Serializable, Object>)factory.createCache(config2);
+      MyCacheListener listener3 = new MyCacheListener();
+      cache3.addCacheListener(listener3);
+      try
+      {
+         cache1.put(new MyKey("a"), "b");
+         assertEquals(1, cache1.getCacheSize());
+         assertEquals("b", cache2.get(new MyKey("a")));
+         assertEquals(1, cache2.getCacheSize());
+         assertEquals(0, cache3.getCacheSize());
+         assertEquals(1, listener1.put);
+         assertEquals(1, listener2.put);
+         assertEquals(0, listener3.put);
+         assertEquals(0, listener1.get);
+         assertEquals(1, listener2.get);
+         assertEquals(0, listener3.get);
+         cache2.put(new MyKey("b"), "c");
+         assertEquals(2, cache1.getCacheSize());
+         assertEquals(2, cache2.getCacheSize());
+         assertEquals("c", cache1.get(new MyKey("b")));
+         assertEquals(0, cache3.getCacheSize());
+         assertEquals(2, listener1.put);
+         assertEquals(2, listener2.put);
+         assertEquals(0, listener3.put);
+         assertEquals(1, listener1.get);
+         assertEquals(1, listener2.get);
+         assertEquals(0, listener3.get);
+         cache3.put(new MyKey("c"), "d");
+         assertEquals(2, cache1.getCacheSize());
+         assertEquals(2, cache2.getCacheSize());
+         assertEquals(1, cache3.getCacheSize());
+         assertEquals("d", cache3.get(new MyKey("c")));
+         assertEquals(2, listener1.put);
+         assertEquals(2, listener2.put);
+         assertEquals(1, listener3.put);
+         assertEquals(1, listener1.get);
+         assertEquals(1, listener2.get);
+         assertEquals(1, listener3.get);
+         cache2.put(new MyKey("a"), "a");
+         assertEquals(2, cache1.getCacheSize());
+         assertEquals(2, cache2.getCacheSize());
+         assertEquals("a", cache1.get(new MyKey("a")));
+         assertEquals(3, listener1.put);
+         assertEquals(3, listener2.put);
+         assertEquals(1, listener3.put);
+         assertEquals(2, listener1.get);
+         assertEquals(1, listener2.get);
+         assertEquals(1, listener3.get);
+         cache2.remove(new MyKey("a"));
+         assertEquals(1, cache1.getCacheSize());
+         assertEquals(1, cache2.getCacheSize());
+         assertEquals(3, listener1.put);
+         assertEquals(3, listener2.put);
+         assertEquals(1, listener3.put);
+         assertEquals(2, listener1.get);
+         assertEquals(1, listener2.get);
+         assertEquals(1, listener3.get);
+         assertEquals(1, listener1.remove);
+         assertEquals(1, listener2.remove);
+         assertEquals(0, listener3.remove);
+         cache1.clearCache();
+         assertEquals(0, cache1.getCacheSize());
+         assertEquals(null, cache2.get(new MyKey("b")));
+         assertEquals(0, cache2.getCacheSize());
+         assertEquals(3, listener1.put);
+         assertEquals(3, listener2.put);
+         assertEquals(1, listener3.put);
+         assertEquals(2, listener1.get);
+         assertEquals(2, listener2.get);
+         assertEquals(1, listener3.get);
+         assertEquals(2, listener1.remove);
+         assertEquals(2, listener2.remove);
+         assertEquals(0, listener3.remove);
+         assertEquals(1, listener1.clearCache);
+         assertEquals(0, listener2.clearCache);
+         assertEquals(0, listener3.clearCache);
+         Map<Serializable, Object> values = new HashMap<Serializable, Object>();
+         values.put(new MyKey("a"), "a");
+         values.put(new MyKey("b"), "b");
+         cache1.putMap(values);
+         assertEquals(2, cache1.getCacheSize());
+         Thread.sleep(40);
+         assertEquals("a", cache2.get(new MyKey("a")));
+         assertEquals("b", cache2.get(new MyKey("b")));
+         assertEquals(2, cache2.getCacheSize());
+         assertEquals(5, listener1.put);
+         assertEquals(5, listener2.put);
+         assertEquals(1, listener3.put);
+         assertEquals(2, listener1.get);
+         assertEquals(4, listener2.get);
+         assertEquals(1, listener3.get);
+         assertEquals(2, listener1.remove);
+         assertEquals(2, listener2.remove);
+         assertEquals(0, listener3.remove);
+         assertEquals(1, listener1.clearCache);
+         assertEquals(0, listener2.clearCache);
+         assertEquals(0, listener3.clearCache);
+         values = new HashMap<Serializable, Object>()
+         {
+            private static final long serialVersionUID = 1L;
+
+            public Set<Entry<Serializable, Object>> entrySet()
+            {
+               Set<Entry<Serializable, Object>> set = new LinkedHashSet<Entry<Serializable, Object>>(super.entrySet());
+               set.add(new Entry<Serializable, Object>()
+               {
+
+                  public Object setValue(Object paramV)
+                  {
+                     return null;
+                  }
+
+                  public Object getValue()
+                  {
+                     throw new RuntimeException("An exception");
+                  }
+
+                  public Serializable getKey()
+                  {
+                     return "c";
+                  }
+               });
+               return set;
+            }
+         };
+         values.put(new MyKey("e"), "e");
+         values.put(new MyKey("d"), "d");
+         cache1.putMap(values);
+         assertEquals(2, cache1.getCacheSize());
+         assertEquals(2, cache2.getCacheSize());
+         assertEquals(5, listener1.put);
+         assertEquals(5, listener2.put);
+         assertEquals(1, listener3.put);
+         assertEquals(2, listener1.get);
+         assertEquals(4, listener2.get);
+         assertEquals(1, listener3.get);
+         assertEquals(2, listener1.remove);
+         assertEquals(2, listener2.remove);
+         assertEquals(0, listener3.remove);
+         assertEquals(1, listener1.clearCache);
+         assertEquals(0, listener2.clearCache);
+         assertEquals(0, listener3.clearCache);
+      }
+      finally
+      {
+         cache1.cache.stop();
+         cache2.cache.stop();
+         cache3.cache.stop();
+      }
+   }
+
+   public void testMultiThreading() throws Exception
+   {
+      long time = System.currentTimeMillis();
+      final ExoCache<Serializable, Object> cache = service.getCacheInstance("test-multi-threading");
+      final int totalElement = 100;
+      final int totalTimes = 20;
+      int reader = 20;
+      int writer = 10;
+      int remover = 5;
+      int cleaner = 1;
+      final CountDownLatch startSignalWriter = new CountDownLatch(1);
+      final CountDownLatch startSignalOthers = new CountDownLatch(1);
+      final CountDownLatch doneSignal = new CountDownLatch(reader + writer + remover);
+      final List<Exception> errors = Collections.synchronizedList(new ArrayList<Exception>());
+      for (int i = 0; i < writer; i++)
+      {
+         final int index = i;
+         Thread thread = new Thread()
+         {
+            public void run()
+            {
+               try
+               {
+                  startSignalWriter.await();
+                  for (int j = 0; j < totalTimes; j++)
+                  {
+                     for (int i = 0; i < totalElement; i++)
+                     {
+                        cache.put(new MyKey("key" + i), "value" + i);
+                     }
+                     if (index == 0 && j == 0)
+                     {
+                        // The cache is full, we can launch the others
+                        startSignalOthers.countDown();
+                     }
+                     sleep(50);
+                  }
+               }
+               catch (Exception e)
+               {
+                  errors.add(e);
+               }
+               finally
+               {
+                  doneSignal.countDown();
+               }
+            }
+         };
+         thread.start();
+      }
+      startSignalWriter.countDown();
+      for (int i = 0; i < reader; i++)
+      {
+         Thread thread = new Thread()
+         {
+            public void run()
+            {
+               try
+               {
+                  startSignalOthers.await();
+                  for (int j = 0; j < totalTimes; j++)
+                  {
+                     for (int i = 0; i < totalElement; i++)
+                     {
+                        cache.get(new MyKey("key" + i));
+                     }
+                     sleep(50);
+                  }
+               }
+               catch (Exception e)
+               {
+                  errors.add(e);
+               }
+               finally
+               {
+                  doneSignal.countDown();
+               }
+            }
+         };
+         thread.start();
+      }
+      for (int i = 0; i < remover; i++)
+      {
+         Thread thread = new Thread()
+         {
+            public void run()
+            {
+               try
+               {
+                  startSignalOthers.await();
+                  for (int j = 0; j < totalTimes; j++)
+                  {
+                     for (int i = 0; i < totalElement; i++)
+                     {
+                        cache.remove(new MyKey("key" + i));
+                     }
+                     sleep(50);
+                  }
+               }
+               catch (Exception e)
+               {
+                  errors.add(e);
+               }
+               finally
+               {
+                  doneSignal.countDown();
+               }
+            }
+         };
+         thread.start();
+      }
+      doneSignal.await();
+      for (int i = 0; i < totalElement; i++)
+      {
+         cache.put(new MyKey("key" + i), "value" + i);
+      }
+      assertEquals(totalElement, cache.getCacheSize());
+      final CountDownLatch startSignal = new CountDownLatch(1);
+      final CountDownLatch doneSignal2 = new CountDownLatch(writer + cleaner);
+      for (int i = 0; i < writer; i++)
+      {
+         Thread thread = new Thread()
+         {
+            public void run()
+            {
+               try
+               {
+                  startSignal.await();
+                  for (int j = 0; j < totalTimes; j++)
+                  {
+                     for (int i = 0; i < totalElement; i++)
+                     {
+                        cache.put(new MyKey("key" + i), "value" + i);
+                     }
+                     sleep(50);
+                  }
+               }
+               catch (Exception e)
+               {
+                  errors.add(e);
+               }
+               finally
+               {
+                  doneSignal2.countDown();
+               }
+            }
+         };
+         thread.start();
+      }
+      for (int i = 0; i < cleaner; i++)
+      {
+         Thread thread = new Thread()
+         {
+            public void run()
+            {
+               try
+               {
+                  startSignal.await();
+                  for (int j = 0; j < totalTimes; j++)
+                  {
+                     sleep(150);
+                     cache.clearCache();
+                  }
+               }
+               catch (Exception e)
+               {
+                  errors.add(e);
+               }
+               finally
+               {
+                  doneSignal2.countDown();
+               }
+            }
+         };
+         thread.start();
+      }
+      cache.clearCache();
+      assertEquals(0, cache.getCacheSize());
+      if (!errors.isEmpty())
+      {
+         for (Exception e : errors)
+         {
+            e.printStackTrace();
+         }
+         throw errors.get(0);
+      }
+      System.out.println("Total Time = " + (System.currentTimeMillis() - time));
+   }
+
+   public static class MyCacheListener implements CacheListener<Serializable, Object>
+   {
+
+      public int clearCache;
+
+      public int expire;
+
+      public int get;
+
+      public int put;
+
+      public int remove;
+
+      public void onClearCache(ExoCache<Serializable, Object> cache) throws Exception
+      {
+         clearCache++;
+      }
+
+      public void onExpire(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
+      {
+         expire++;
+      }
+
+      public void onGet(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
+      {
+         get++;
+      }
+
+      public void onPut(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
+      {
+         put++;
+      }
+
+      public void onRemove(ExoCache<Serializable, Object> cache, Serializable key, Object obj) throws Exception
+      {
+         remove++;
+      }
+
+      public void onClearCache(CacheListenerContext context) throws Exception
+      {
+         clearCache++;
+      }
+
+      public void onExpire(CacheListenerContext context, Serializable key, Object obj) throws Exception
+      {
+         expire++;
+      }
+
+      public void onGet(CacheListenerContext context, Serializable key, Object obj) throws Exception
+      {
+         get++;
+      }
+
+      public void onPut(CacheListenerContext context, Serializable key, Object obj) throws Exception
+      {
+         put++;
+      }
+
+      public void onRemove(CacheListenerContext context, Serializable key, Object obj) throws Exception
+      {
+         remove++;
+      }
+   }
+
+   public static class MyKey implements Serializable
+   {
+      private static final long serialVersionUID = 1L;
+      public String value;
+
+      public MyKey(String value)
+      {
+         this.value = value;
+      }
+
+      @Override
+      public boolean equals(Object paramObject)
+      {
+         return paramObject instanceof MyKey && ((MyKey)paramObject).value.endsWith(value);
+      }
+
+      @Override
+      public int hashCode()
+      {
+         return value.hashCode();
+      }
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,32 +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.cache.impl.jboss;
-
-import org.exoplatform.services.cache.ExoCacheConfig;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class TestExoCacheConfig extends ExoCacheConfig
-{
-
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheConfig.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,32 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.services.cache.ExoCacheConfig;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class TestExoCacheConfig extends ExoCacheConfig
+{
+
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,217 +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.cache.impl.jboss;
-
-import org.exoplatform.services.cache.CacheListener;
-import org.exoplatform.services.cache.CachedObjectSelector;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ExoCacheConfig;
-import org.exoplatform.services.cache.ExoCacheInitException;
-import org.jboss.cache.Cache;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class TestExoCacheCreator implements ExoCacheCreator
-{
-
-   public ExoCache create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
-   {
-      return new TestExoCache();
-   }
-
-   public Class<? extends ExoCacheConfig> getExpectedConfigType()
-   {
-      return TestExoCacheConfig.class;
-   }
-
-   public String getExpectedImplementation()
-   {
-      return "TEST";
-   }
-
-   public static class TestExoCache implements ExoCache
-   {
-
-      public void addCacheListener(CacheListener listener)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-
-      public int getCacheHit()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int getCacheMiss()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int getCacheSize()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public List getCachedObjects()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public String getLabel()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public long getLiveTime()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int getMaxSize()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public String getName()
-      {
-         return "name";
-      }
-
-      public boolean isDistributed()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public boolean isLogEnabled()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public boolean isReplicated()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-
-      public void select(CachedObjectSelector selector) throws Exception
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setDistributed(boolean b)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setLabel(String s)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setLiveTime(long period)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setLogEnabled(boolean b)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setMaxSize(int max)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setName(String name)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void setReplicated(boolean b)
-      {
-         // TODO Auto-generated method stub
-
-      }
-
-      public void clearCache()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public Object get(Serializable key)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public void put(Serializable key, Object value) throws NullPointerException
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putMap(Map objs) throws NullPointerException, IllegalArgumentException
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public Object remove(Serializable key) throws NullPointerException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public List removeCachedObjects()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheCreator.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,217 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.services.cache.CacheListener;
+import org.exoplatform.services.cache.CachedObjectSelector;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ExoCacheConfig;
+import org.exoplatform.services.cache.ExoCacheInitException;
+import org.jboss.cache.Cache;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class TestExoCacheCreator implements ExoCacheCreator
+{
+
+   public ExoCache create(ExoCacheConfig config, Cache<Serializable, Object> cache) throws ExoCacheInitException
+   {
+      return new TestExoCache();
+   }
+
+   public Class<? extends ExoCacheConfig> getExpectedConfigType()
+   {
+      return TestExoCacheConfig.class;
+   }
+
+   public String getExpectedImplementation()
+   {
+      return "TEST";
+   }
+
+   public static class TestExoCache implements ExoCache
+   {
+
+      public void addCacheListener(CacheListener listener)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+
+      public int getCacheHit()
+      {
+         // TODO Auto-generated method stub
+         return 0;
+      }
+
+      public int getCacheMiss()
+      {
+         // TODO Auto-generated method stub
+         return 0;
+      }
+
+      public int getCacheSize()
+      {
+         // TODO Auto-generated method stub
+         return 0;
+      }
+
+      public List getCachedObjects()
+      {
+         // TODO Auto-generated method stub
+         return null;
+      }
+
+      public String getLabel()
+      {
+         // TODO Auto-generated method stub
+         return null;
+      }
+
+      public long getLiveTime()
+      {
+         // TODO Auto-generated method stub
+         return 0;
+      }
+
+      public int getMaxSize()
+      {
+         // TODO Auto-generated method stub
+         return 0;
+      }
+
+      public String getName()
+      {
+         return "name";
+      }
+
+      public boolean isDistributed()
+      {
+         // TODO Auto-generated method stub
+         return false;
+      }
+
+      public boolean isLogEnabled()
+      {
+         // TODO Auto-generated method stub
+         return false;
+      }
+
+      public boolean isReplicated()
+      {
+         // TODO Auto-generated method stub
+         return false;
+      }
+
+
+      public void select(CachedObjectSelector selector) throws Exception
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setDistributed(boolean b)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setLabel(String s)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setLiveTime(long period)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setLogEnabled(boolean b)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setMaxSize(int max)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setName(String name)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void setReplicated(boolean b)
+      {
+         // TODO Auto-generated method stub
+
+      }
+
+      public void clearCache()
+      {
+         // TODO Auto-generated method stub
+         
+      }
+
+      public Object get(Serializable key)
+      {
+         // TODO Auto-generated method stub
+         return null;
+      }
+
+      public void put(Serializable key, Object value) throws NullPointerException
+      {
+         // TODO Auto-generated method stub
+         
+      }
+
+      public void putMap(Map objs) throws NullPointerException, IllegalArgumentException
+      {
+         // TODO Auto-generated method stub
+         
+      }
+
+      public Object remove(Serializable key) throws NullPointerException
+      {
+         // TODO Auto-generated method stub
+         return null;
+      }
+
+      public List removeCachedObjects()
+      {
+         // TODO Auto-generated method stub
+         return null;
+      }
+
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,79 +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.cache.impl.jboss;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.impl.jboss.TestExoCacheCreator.TestExoCache;
-import org.exoplatform.test.BasicTestCase;
-import org.jboss.cache.config.Configuration.CacheMode;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 20 juil. 2009  
- */
-public class TestExoCacheFactoryImpl extends BasicTestCase
-{
-
-   CacheService service_;
-
-   public TestExoCacheFactoryImpl(String name)
-   {
-      super(name);
-   }
-
-   public void setUp() throws Exception
-   {
-      service_ = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
-   }
-
-   public void testCacheFactory()
-   {
-      ExoCache cache = service_.getCacheInstance("myCache");
-      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
-      AbstractExoCache aCache = (AbstractExoCache)cache;
-      assertTrue("expect a local cache", aCache.cache.getConfiguration().getCacheMode() == CacheMode.LOCAL);
-      aCache.cache.stop();
-      cache = service_.getCacheInstance("cacheDistributed");
-      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
-      aCache = (AbstractExoCache)cache;
-      assertTrue("expect a distributed cache", aCache.cache.getConfiguration().getCacheMode() == CacheMode.REPL_SYNC);
-      aCache.cache.stop();
-      cache = service_.getCacheInstance("myCustomCache");
-      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
-      aCache = (AbstractExoCache)cache;
-      assertTrue("expect a distributed cache", aCache.cache.getConfiguration().getCacheMode() == CacheMode.REPL_SYNC);
-      aCache.cache.stop();
-   }
-
-   public void testExoCacheCreator()
-   {
-      ExoCache cache = service_.getCacheInstance("test-default-impl");
-      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
-      AbstractExoCache aCache = (AbstractExoCache)cache;
-      aCache.cache.stop();
-      cache = service_.getCacheInstance("test-custom-impl-with-old-config");
-      assertTrue("expect an instance of TestExoCache", cache instanceof TestExoCache);
-      cache = service_.getCacheInstance("test-custom-impl-with-new-config");
-      assertTrue("expect an instance of TestExoCache", cache instanceof TestExoCache);
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestExoCacheFactoryImpl.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,79 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.impl.jboss.TestExoCacheCreator.TestExoCache;
+import org.exoplatform.test.BasicTestCase;
+import org.jboss.cache.config.Configuration.CacheMode;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 20 juil. 2009  
+ */
+public class TestExoCacheFactoryImpl extends BasicTestCase
+{
+
+   CacheService service_;
+
+   public TestExoCacheFactoryImpl(String name)
+   {
+      super(name);
+   }
+
+   public void setUp() throws Exception
+   {
+      service_ = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
+   }
+
+   public void testCacheFactory()
+   {
+      ExoCache cache = service_.getCacheInstance("myCache");
+      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
+      AbstractExoCache aCache = (AbstractExoCache)cache;
+      assertTrue("expect a local cache", aCache.cache.getConfiguration().getCacheMode() == CacheMode.LOCAL);
+      aCache.cache.stop();
+      cache = service_.getCacheInstance("cacheDistributed");
+      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
+      aCache = (AbstractExoCache)cache;
+      assertTrue("expect a distributed cache", aCache.cache.getConfiguration().getCacheMode() == CacheMode.REPL_SYNC);
+      aCache.cache.stop();
+      cache = service_.getCacheInstance("myCustomCache");
+      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
+      aCache = (AbstractExoCache)cache;
+      assertTrue("expect a distributed cache", aCache.cache.getConfiguration().getCacheMode() == CacheMode.REPL_SYNC);
+      aCache.cache.stop();
+   }
+
+   public void testExoCacheCreator()
+   {
+      ExoCache cache = service_.getCacheInstance("test-default-impl");
+      assertTrue("expect an instance of AbstractExoCache", cache instanceof AbstractExoCache);
+      AbstractExoCache aCache = (AbstractExoCache)cache;
+      aCache.cache.stop();
+      cache = service_.getCacheInstance("test-custom-impl-with-old-config");
+      assertTrue("expect an instance of TestExoCache", cache instanceof TestExoCache);
+      cache = service_.getCacheInstance("test-custom-impl-with-new-config");
+      assertTrue("expect an instance of TestExoCache", cache instanceof TestExoCache);
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,85 +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.cache.impl.jboss;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.test.BasicTestCase;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class TestFIFOCache extends BasicTestCase
-{
-
-   CacheService service_;
-
-   public TestFIFOCache(String name)
-   {
-      super(name);
-   }
-
-   public void setUp() throws Exception
-   {
-      service_ = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
-   }
-
-   public void testPolicy() throws Exception
-   {
-      testPolicy("test-fifo");
-      testPolicy("test-fifo-with-old-config");
-   }
-
-   private void testPolicy(String cacheName) throws Exception
-   {
-      ExoCache cache = service_.getCacheInstance(cacheName);
-      cache.put("a", "a");
-      cache.put("b", "a");
-      cache.put("c", "a");
-      cache.put("d", "a");
-      assertEquals(4, cache.getCacheSize());
-      cache.put("e", "a");
-      assertEquals(5, cache.getCacheSize());
-      cache.put("f", "a");
-      assertEquals(6, cache.getCacheSize());
-      Thread.sleep(500);
-      assertEquals(6, cache.getCacheSize());
-      Thread.sleep(600);
-      assertEquals(5, cache.getCacheSize());
-      cache.setMaxSize(3);
-      cache.setLiveTime(1500);
-      cache.put("g", "a");
-      assertEquals(6, cache.getCacheSize());
-      Thread.sleep(1100);
-      assertEquals(3, cache.getCacheSize());
-      cache.put("h", "a");
-      cache.put("i", "a");
-      cache.put("j", "a");
-      cache.put("k", "a");
-      assertEquals(7, cache.getCacheSize());
-      Thread.sleep(500);
-      assertEquals(4, cache.getCacheSize());
-      Thread.sleep(1100);
-      assertEquals(3, cache.getCacheSize());
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestFIFOCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,85 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.test.BasicTestCase;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class TestFIFOCache extends BasicTestCase
+{
+
+   CacheService service_;
+
+   public TestFIFOCache(String name)
+   {
+      super(name);
+   }
+
+   public void setUp() throws Exception
+   {
+      service_ = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
+   }
+
+   public void testPolicy() throws Exception
+   {
+      testPolicy("test-fifo");
+      testPolicy("test-fifo-with-old-config");
+   }
+
+   private void testPolicy(String cacheName) throws Exception
+   {
+      ExoCache cache = service_.getCacheInstance(cacheName);
+      cache.put("a", "a");
+      cache.put("b", "a");
+      cache.put("c", "a");
+      cache.put("d", "a");
+      assertEquals(4, cache.getCacheSize());
+      cache.put("e", "a");
+      assertEquals(5, cache.getCacheSize());
+      cache.put("f", "a");
+      assertEquals(6, cache.getCacheSize());
+      Thread.sleep(500);
+      assertEquals(6, cache.getCacheSize());
+      Thread.sleep(600);
+      assertEquals(5, cache.getCacheSize());
+      cache.setMaxSize(3);
+      cache.setLiveTime(1500);
+      cache.put("g", "a");
+      assertEquals(6, cache.getCacheSize());
+      Thread.sleep(1100);
+      assertEquals(3, cache.getCacheSize());
+      cache.put("h", "a");
+      cache.put("i", "a");
+      cache.put("j", "a");
+      cache.put("k", "a");
+      assertEquals(7, cache.getCacheSize());
+      Thread.sleep(500);
+      assertEquals(4, cache.getCacheSize());
+      Thread.sleep(1100);
+      assertEquals(3, cache.getCacheSize());
+   }
+}

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,91 +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.cache.impl.jboss;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator.LRUExoCache;
-import org.exoplatform.test.BasicTestCase;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- *          exo at exoplatform.com
- * 21 juil. 2009  
- */
-public class TestLRUCache extends BasicTestCase
-{
-
-   CacheService service_;
-
-   public TestLRUCache(String name)
-   {
-      super(name);
-   }
-
-   public void setUp() throws Exception
-   {
-      service_ = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
-   }
-
-   public void testPolicy() throws Exception
-   {
-      testPolicy("test-lru");
-      testPolicy("test-lru-with-old-config");
-   }
-
-   private void testPolicy(String cacheName) throws Exception
-   {
-      LRUExoCache cache = (LRUExoCache)service_.getCacheInstance(cacheName);
-      cache.put("a", "a");
-      cache.put("b", "a");
-      cache.put("c", "a");
-      cache.put("d", "a");
-      assertEquals(4, cache.getCacheSize());
-      cache.put("e", "a");
-      assertEquals(5, cache.getCacheSize());
-      cache.put("f", "a");
-      assertEquals(6, cache.getCacheSize());
-      Thread.sleep(1000);
-      assertFalse(cache.get("b") == null);
-      assertFalse(cache.get("c") == null);
-      assertFalse(cache.get("d") == null);
-      Thread.sleep(600);
-      assertEquals(3, cache.getCacheSize());
-      Thread.sleep(500);
-      assertEquals(0, cache.getCacheSize());
-      cache.setMaxSize(3);
-      cache.setTimeToLive(500);
-      cache.setMaxAge(1000);
-      cache.put("a", "a");
-      cache.put("b", "a");
-      cache.put("c", "a");
-      cache.put("d", "a");
-      assertEquals(4, cache.getCacheSize());
-      cache.put("e", "a");
-      assertEquals(5, cache.getCacheSize());
-      cache.put("f", "a");
-      Thread.sleep(500);
-      cache.get("a");
-      cache.get("b");
-      assertEquals(3, cache.getCacheSize());
-      Thread.sleep(600);
-      assertEquals(0, cache.getCacheSize());
-   }
-}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/java/org/exoplatform/services/cache/impl/jboss/TestLRUCache.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,91 @@
+/*
+ * 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.cache.impl.jboss;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator.LRUExoCache;
+import org.exoplatform.test.BasicTestCase;
+
+/**
+ * Created by The eXo Platform SAS
+ * Author : eXoPlatform
+ *          exo at exoplatform.com
+ * 21 juil. 2009  
+ */
+public class TestLRUCache extends BasicTestCase
+{
+
+   CacheService service_;
+
+   public TestLRUCache(String name)
+   {
+      super(name);
+   }
+
+   public void setUp() throws Exception
+   {
+      service_ = (CacheService)PortalContainer.getInstance().getComponentInstanceOfType(CacheService.class);
+   }
+
+   public void testPolicy() throws Exception
+   {
+      testPolicy("test-lru");
+      testPolicy("test-lru-with-old-config");
+   }
+
+   private void testPolicy(String cacheName) throws Exception
+   {
+      LRUExoCache cache = (LRUExoCache)service_.getCacheInstance(cacheName);
+      cache.put("a", "a");
+      cache.put("b", "a");
+      cache.put("c", "a");
+      cache.put("d", "a");
+      assertEquals(4, cache.getCacheSize());
+      cache.put("e", "a");
+      assertEquals(5, cache.getCacheSize());
+      cache.put("f", "a");
+      assertEquals(6, cache.getCacheSize());
+      Thread.sleep(1000);
+      assertFalse(cache.get("b") == null);
+      assertFalse(cache.get("c") == null);
+      assertFalse(cache.get("d") == null);
+      Thread.sleep(600);
+      assertEquals(3, cache.getCacheSize());
+      Thread.sleep(500);
+      assertEquals(0, cache.getCacheSize());
+      cache.setMaxSize(3);
+      cache.setTimeToLive(500);
+      cache.setMaxAge(1000);
+      cache.put("a", "a");
+      cache.put("b", "a");
+      cache.put("c", "a");
+      cache.put("d", "a");
+      assertEquals(4, cache.getCacheSize());
+      cache.put("e", "a");
+      assertEquals(5, cache.getCacheSize());
+      cache.put("f", "a");
+      Thread.sleep(500);
+      cache.get("a");
+      cache.get("b");
+      assertEquals(3, cache.getCacheSize());
+      Thread.sleep(600);
+      assertEquals(0, cache.getCacheSize());
+   }
+}

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf)

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal)

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,183 +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.
-
--->
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
-
-   <!--
-      isolation levels supported: READ_COMMITTED and REPEATABLE_READ nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic (deprecated)
-   -->
-   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="mvcc"
-      writeSkewCheck="false" concurrencyLevel="500" />
-
-
-   <!--
-      Used to register a transaction manager and participate in ongoing
-      transactions.
-   -->
-   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" syncRollbackPhase="false"
-      syncCommitPhase="false" />
-
-
-   <!--
-      Used to register JMX statistics in any available MBean server
-   -->
-   <jmxStatistics enabled="false" />
-
-   <!--
-      If region based marshalling is used, defines whether new regions are
-      inactive on startup.
-   -->
-   <startup regionsInactiveOnStartup="true" />
-
-   <!--
-      Used to register JVM shutdown hooks. hookBehavior: DEFAULT, REGISTER,
-      DONT_REGISTER
-   -->
-   <shutdown hookBehavior="DEFAULT" />
-
-
-   <!--
-      Used to define async listener notification thread pool size
-   -->
-   <listeners asyncPoolSize="1" asyncQueueSize="100000" />
-
-   <!--
-      Used to enable invocation batching and allow the use of
-      Cache.startBatch()/endBatch() methods.
-   -->
-   <invocationBatching enabled="false" />
-
-   <!--
-      serialization related configuration, used for replication and cache
-      loading
-   -->
-
-   <!--
-      serialization objectInputStreamPoolSize="12" objectOutputStreamPoolSize="14" version="3.0.0"
-      marshallerClass="org.jboss.cache.marshall.VersionAwareMarshaller" useLazyDeserialization="false" useRegionBasedMarshalling="false" /
-   -->
-
-   <!--
-      This element specifies that the cache is clustered. modes supported:
-      replication (r) or invalidation (i).
-   -->
-   <clustering mode="replication" clusterName="JBossCache-cluster">
-
-      <!--
-         Defines whether to retrieve state on startup
-      -->
-      <stateRetrieval timeout="20000" fetchInMemoryState="false" />
-
-      <!--
-         Network calls are synchronous.
-      -->
-      <sync replTimeout="20000" />
-
-      <!--
-         Uncomment this for async replication.
-      -->
-
-      <!--
-         <async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500" serializationExecutorPoolSize="20"
-         serializationExecutorQueueSize="5000000"/>
-      -->
-
-      <!-- Uncomment to use Buddy Replication -->
-      <!--
-         <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000"> <dataGravitation auto="true" removeOnFind="true"
-         searchBackupTrees="true"/> <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator"> <properties> numBuddies = 1 ignoreColocatedBuddies
-         = true </properties> </locator> </buddy>
-      -->
-
-      <!--
-         Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml ships with jgroups.jar and will be picked up by
-         the class loader.
-      -->
-      <jgroupsConfig configFile="udp.xml">
-         <!--
-            uncomment to define a JGroups stack here <PING timeout="2000" num_initial_members="3"/> <MERGE2 max_interval="30000" min_interval="10000"/>
-            <FD_SOCK/> <FD timeout="10000" max_tries="5" shun="true"/> <VERIFY_SUSPECT timeout="1500"/> <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
-
-            retransmit_timeout="300,600,1200,2400,4800" discard_delivered_msgs="true"/> <UNICAST timeout="300,600,1200,2400,3600"/> <pbcast.STABLE
-            stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/> <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
-            view_bundling="true" view_ack_collection_timeout="5000"/> <FRAG2 frag_size="60000"/> <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
-
-            <pbcast.FLUSH timeout="0"/>
-         -->
-      </jgroupsConfig>
-   </clustering>
-
-   <!--
-      Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means the eviction thread will never run.
-   -->
-   <eviction wakeUpInterval="50">
-      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
-         <property name="maxNodes" value="1" />
-         <property name="timeToLive" value="5000" />
-      </default>
-      <!--
-         region name="/org/jboss/data1"> <property name="timeToLive" value="2000" /> </region> <region name="/org/jboss/data2"
-         algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000"> <property name="maxNodes" value="3000" /> <property
-         name="minTimeToLive" value="4000" /> </region
-      -->
-   </eviction>
-
-   <!--
-      Cache loaders. If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state is accessed again, it is
-      removed from the cache loader and loaded into memory. Otherwise, state is always maintained in the cache loader as well as in memory. Set 'shared' to true
-      if all instances in the cluster use the same cache loader instance, e.g., are talking to the same database.
-   -->
-   <!--
-      <loaders passivation="false" shared="false"> <preload> <node fqn="/org/jboss" /> <node fqn="/org/tempdata" /> </preload>
-   -->
-   <!--
-         we can have multiple cache loaders, which get chained
-      -->
-
-   <!--
-      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true" ignoreModifications="true" purgeOnStartup="true">
-
-      <properties> cache.jdbc.table.name=jbosscache cache.jdbc.table.create=true cache.jdbc.table.drop=true </properties> <singletonStore enabled="true"
-      class="org.jboss.cache.loader.SingletonStoreCacheLoader"> <properties> pushStateWhenCoordinator=true pushStateWhenCoordinatorTimeout=20000 </properties>
-
-      </singletonStore> </loader> </loaders>
-   -->
-
-
-   <!--
-
-      Define custom interceptors. All custom interceptors need to extend
-      org.jboss.cache.interceptors.base.CommandInterceptor
-   -->
-
-   <!--
-
-      <customInterceptors> <interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"> <property
-      name="attrOne" value="value1" /> <property name="attrTwo" value="value2" /> </interceptor> <interceptor position="last"
-      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor index="3"
-      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> <interceptor before="org.jboss.cache.interceptors.CallInterceptor"
-
-      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor after="org.jboss.cache.interceptors.CallInterceptor"
-
-      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> </customInterceptors>
-   -->
-</jbosscache>
-

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/cache-configuration-template.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,183 @@
+<?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.
+
+-->
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+
+   <!--
+      isolation levels supported: READ_COMMITTED and REPEATABLE_READ nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic (deprecated)
+   -->
+   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="mvcc"
+      writeSkewCheck="false" concurrencyLevel="500" />
+
+
+   <!--
+      Used to register a transaction manager and participate in ongoing
+      transactions.
+   -->
+   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" syncRollbackPhase="false"
+      syncCommitPhase="false" />
+
+
+   <!--
+      Used to register JMX statistics in any available MBean server
+   -->
+   <jmxStatistics enabled="false" />
+
+   <!--
+      If region based marshalling is used, defines whether new regions are
+      inactive on startup.
+   -->
+   <startup regionsInactiveOnStartup="true" />
+
+   <!--
+      Used to register JVM shutdown hooks. hookBehavior: DEFAULT, REGISTER,
+      DONT_REGISTER
+   -->
+   <shutdown hookBehavior="DEFAULT" />
+
+
+   <!--
+      Used to define async listener notification thread pool size
+   -->
+   <listeners asyncPoolSize="1" asyncQueueSize="100000" />
+
+   <!--
+      Used to enable invocation batching and allow the use of
+      Cache.startBatch()/endBatch() methods.
+   -->
+   <invocationBatching enabled="false" />
+
+   <!--
+      serialization related configuration, used for replication and cache
+      loading
+   -->
+
+   <!--
+      serialization objectInputStreamPoolSize="12" objectOutputStreamPoolSize="14" version="3.0.0"
+      marshallerClass="org.jboss.cache.marshall.VersionAwareMarshaller" useLazyDeserialization="false" useRegionBasedMarshalling="false" /
+   -->
+
+   <!--
+      This element specifies that the cache is clustered. modes supported:
+      replication (r) or invalidation (i).
+   -->
+   <clustering mode="replication" clusterName="JBossCache-cluster">
+
+      <!--
+         Defines whether to retrieve state on startup
+      -->
+      <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+
+      <!--
+         Network calls are synchronous.
+      -->
+      <sync replTimeout="20000" />
+
+      <!--
+         Uncomment this for async replication.
+      -->
+
+      <!--
+         <async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500" serializationExecutorPoolSize="20"
+         serializationExecutorQueueSize="5000000"/>
+      -->
+
+      <!-- Uncomment to use Buddy Replication -->
+      <!--
+         <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000"> <dataGravitation auto="true" removeOnFind="true"
+         searchBackupTrees="true"/> <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator"> <properties> numBuddies = 1 ignoreColocatedBuddies
+         = true </properties> </locator> </buddy>
+      -->
+
+      <!--
+         Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml ships with jgroups.jar and will be picked up by
+         the class loader.
+      -->
+      <jgroupsConfig configFile="udp.xml">
+         <!--
+            uncomment to define a JGroups stack here <PING timeout="2000" num_initial_members="3"/> <MERGE2 max_interval="30000" min_interval="10000"/>
+            <FD_SOCK/> <FD timeout="10000" max_tries="5" shun="true"/> <VERIFY_SUSPECT timeout="1500"/> <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+
+            retransmit_timeout="300,600,1200,2400,4800" discard_delivered_msgs="true"/> <UNICAST timeout="300,600,1200,2400,3600"/> <pbcast.STABLE
+            stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/> <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+            view_bundling="true" view_ack_collection_timeout="5000"/> <FRAG2 frag_size="60000"/> <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+
+            <pbcast.FLUSH timeout="0"/>
+         -->
+      </jgroupsConfig>
+   </clustering>
+
+   <!--
+      Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means the eviction thread will never run.
+   -->
+   <eviction wakeUpInterval="50">
+      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
+         <property name="maxNodes" value="1" />
+         <property name="timeToLive" value="5000" />
+      </default>
+      <!--
+         region name="/org/jboss/data1"> <property name="timeToLive" value="2000" /> </region> <region name="/org/jboss/data2"
+         algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000"> <property name="maxNodes" value="3000" /> <property
+         name="minTimeToLive" value="4000" /> </region
+      -->
+   </eviction>
+
+   <!--
+      Cache loaders. If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state is accessed again, it is
+      removed from the cache loader and loaded into memory. Otherwise, state is always maintained in the cache loader as well as in memory. Set 'shared' to true
+      if all instances in the cluster use the same cache loader instance, e.g., are talking to the same database.
+   -->
+   <!--
+      <loaders passivation="false" shared="false"> <preload> <node fqn="/org/jboss" /> <node fqn="/org/tempdata" /> </preload>
+   -->
+   <!--
+         we can have multiple cache loaders, which get chained
+      -->
+
+   <!--
+      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true" ignoreModifications="true" purgeOnStartup="true">
+
+      <properties> cache.jdbc.table.name=jbosscache cache.jdbc.table.create=true cache.jdbc.table.drop=true </properties> <singletonStore enabled="true"
+      class="org.jboss.cache.loader.SingletonStoreCacheLoader"> <properties> pushStateWhenCoordinator=true pushStateWhenCoordinatorTimeout=20000 </properties>
+
+      </singletonStore> </loader> </loaders>
+   -->
+
+
+   <!--
+
+      Define custom interceptors. All custom interceptors need to extend
+      org.jboss.cache.interceptors.base.CommandInterceptor
+   -->
+
+   <!--
+
+      <customInterceptors> <interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"> <property
+      name="attrOne" value="value1" /> <property name="attrTwo" value="value2" /> </interceptor> <interceptor position="last"
+      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor index="3"
+      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> <interceptor before="org.jboss.cache.interceptors.CallInterceptor"
+
+      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor after="org.jboss.cache.interceptors.CallInterceptor"
+
+      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> </customInterceptors>
+   -->
+</jbosscache>
+

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,193 +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.
-
--->
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
-
-   <!--
-      isolation levels supported: READ_COMMITTED and REPEATABLE_READ
-
-      nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic
-      (deprecated)
-   -->
-
-   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="mvcc"
-      writeSkewCheck="false" concurrencyLevel="500" />
-
-   <!--
-      Used to register a transaction manager and participate in ongoing
-      transactions.
-   -->
-   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" syncRollbackPhase="false"
-      syncCommitPhase="false" />
-
-   <!--
-      Used to register JMX statistics in any available MBean server
-   -->
-   <jmxStatistics enabled="false" />
-
-   <!--
-      If region based marshalling is used, defines whether new regions are
-      inactive on startup.
-   -->
-   <startup regionsInactiveOnStartup="true" />
-
-   <!--
-      Used to register JVM shutdown hooks. hookBehavior: DEFAULT, REGISTER,
-      DONT_REGISTER
-   -->
-   <shutdown hookBehavior="DEFAULT" />
-
-   <!--
-      Used to define async listener notification thread pool size
-   -->
-   <listeners asyncPoolSize="1" asyncQueueSize="100000" />
-
-   <!--
-      Used to enable invocation batching and allow the use of
-      Cache.startBatch()/endBatch() methods.
-   -->
-   <invocationBatching enabled="false" />
-
-   <!--
-      serialization related configuration, used for replication and cache
-      loading
-   -->
-
-   <!--
-      serialization objectInputStreamPoolSize="12" objectOutputStreamPoolSize="14" version="3.0.0"
-
-      marshallerClass="org.jboss.cache.marshall.VersionAwareMarshaller" useLazyDeserialization="false" useRegionBasedMarshalling="false" /
-   -->
-
-   <!--
-      This element specifies that the cache is clustered. modes supported:
-      replication (r) or invalidation (i).
-   -->
-   <clustering mode="replication" clusterName="JBossCache-cluster">
-
-
-      <!--
-         Defines whether to retrieve state on startup
-      -->
-      <stateRetrieval timeout="20000" fetchInMemoryState="false" />
-
-      <!--
-      Network calls are synchronous.
-      -->
-      <sync replTimeout="20000" />
-
-      <!--
-      Uncomment this for async replication.
-      -->
-
-      <!--
-         <async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500" serializationExecutorPoolSize="20"
-         serializationExecutorQueueSize="5000000"/>
-      -->
-
-      <!-- Uncomment to use Buddy Replication -->
-      <!--
-         <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000"> <dataGravitation auto="true" removeOnFind="true"
-         searchBackupTrees="true"/> <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator"> <properties> numBuddies = 1 ignoreColocatedBuddies
-         = true </properties> </locator> </buddy>
-      -->
-
-      <!--
-
-         Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml ships with jgroups.jar and will be picked up by
-         the class loader.
-      -->
-      <jgroupsConfig configFile="udp.xml">
-         <!--
-            uncomment to define a JGroups stack here <PING timeout="2000" num_initial_members="3"/> <MERGE2 max_interval="30000" min_interval="10000"/>
-            <FD_SOCK/> <FD timeout="10000" max_tries="5" shun="true"/> <VERIFY_SUSPECT timeout="1500"/> <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
-
-            retransmit_timeout="300,600,1200,2400,4800" discard_delivered_msgs="true"/> <UNICAST timeout="300,600,1200,2400,3600"/> <pbcast.STABLE
-            stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/> <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
-            view_bundling="true" view_ack_collection_timeout="5000"/> <FRAG2 frag_size="60000"/> <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
-
-            <pbcast.FLUSH timeout="0"/>
-         -->
-      </jgroupsConfig>
-   </clustering>
-
-   <!--
-
-      Eviction configuration. WakeupInterval defines how often the eviction
-      thread runs, in milliseconds. 0 means the eviction thread will never
-      run.
-   -->
-   <eviction wakeUpInterval="500">
-      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
-         <property name="maxNodes" value="1" />
-         <property name="timeToLive" value="5000" />
-      </default>
-
-      <!--
-         region name="/org/jboss/data1"> <property name="timeToLive" value="2000" /> </region> <region name="/org/jboss/data2"
-         algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000"> <property name="maxNodes" value="3000" /> <property
-         name="minTimeToLive" value="4000" /> </region
-      -->
-   </eviction>
-
-   <!--
-      Cache loaders. If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state is accessed again, it is
-      removed from the cache loader and loaded into memory. Otherwise, state is always maintained in the cache loader as well as in memory. Set 'shared' to true
-      if all instances in the cluster use the same cache loader instance, e.g., are talking to the same database.
-   -->
-   <!--
-   <loaders passivation="false" shared="false">
-      <preload>
-         <node fqn="/org/jboss" />
-         <node fqn="/org/tempdata" />
-      </preload>
-   -->
-   
-   <!--
-         we can have multiple cache loaders, which get chained
-   -->
-
-   <!--
-      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true" ignoreModifications="true" purgeOnStartup="true">
-
-      <properties> cache.jdbc.table.name=jbosscache cache.jdbc.table.create=true cache.jdbc.table.drop=true </properties> <singletonStore enabled="true"
-      class="org.jboss.cache.loader.SingletonStoreCacheLoader"> <properties> pushStateWhenCoordinator=true pushStateWhenCoordinatorTimeout=20000 </properties>
-
-      </singletonStore> </loader> </loaders>
-   -->
-
-   <!--
-      Define custom interceptors. All custom interceptors need to extend
-      org.jboss.cache.interceptors.base.CommandInterceptor
-   -->
-
-   <!--
-      <customInterceptors> <interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"> <property
-      name="attrOne" value="value1" /> <property name="attrTwo" value="value2" /> </interceptor> <interceptor position="last"
-      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor index="3"
-      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> <interceptor before="org.jboss.cache.interceptors.CallInterceptor"
-
-      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor after="org.jboss.cache.interceptors.CallInterceptor"
-
-      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> </customInterceptors>
-   -->
-</jbosscache>
-

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/distributed-cache-configuration-template.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,193 @@
+<?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.
+
+-->
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+
+   <!--
+      isolation levels supported: READ_COMMITTED and REPEATABLE_READ
+
+      nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic
+      (deprecated)
+   -->
+
+   <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" nodeLockingScheme="mvcc"
+      writeSkewCheck="false" concurrencyLevel="500" />
+
+   <!--
+      Used to register a transaction manager and participate in ongoing
+      transactions.
+   -->
+   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" syncRollbackPhase="false"
+      syncCommitPhase="false" />
+
+   <!--
+      Used to register JMX statistics in any available MBean server
+   -->
+   <jmxStatistics enabled="false" />
+
+   <!--
+      If region based marshalling is used, defines whether new regions are
+      inactive on startup.
+   -->
+   <startup regionsInactiveOnStartup="true" />
+
+   <!--
+      Used to register JVM shutdown hooks. hookBehavior: DEFAULT, REGISTER,
+      DONT_REGISTER
+   -->
+   <shutdown hookBehavior="DEFAULT" />
+
+   <!--
+      Used to define async listener notification thread pool size
+   -->
+   <listeners asyncPoolSize="1" asyncQueueSize="100000" />
+
+   <!--
+      Used to enable invocation batching and allow the use of
+      Cache.startBatch()/endBatch() methods.
+   -->
+   <invocationBatching enabled="false" />
+
+   <!--
+      serialization related configuration, used for replication and cache
+      loading
+   -->
+
+   <!--
+      serialization objectInputStreamPoolSize="12" objectOutputStreamPoolSize="14" version="3.0.0"
+
+      marshallerClass="org.jboss.cache.marshall.VersionAwareMarshaller" useLazyDeserialization="false" useRegionBasedMarshalling="false" /
+   -->
+
+   <!--
+      This element specifies that the cache is clustered. modes supported:
+      replication (r) or invalidation (i).
+   -->
+   <clustering mode="replication" clusterName="JBossCache-cluster">
+
+
+      <!--
+         Defines whether to retrieve state on startup
+      -->
+      <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+
+      <!--
+      Network calls are synchronous.
+      -->
+      <sync replTimeout="20000" />
+
+      <!--
+      Uncomment this for async replication.
+      -->
+
+      <!--
+         <async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500" serializationExecutorPoolSize="20"
+         serializationExecutorQueueSize="5000000"/>
+      -->
+
+      <!-- Uncomment to use Buddy Replication -->
+      <!--
+         <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000"> <dataGravitation auto="true" removeOnFind="true"
+         searchBackupTrees="true"/> <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator"> <properties> numBuddies = 1 ignoreColocatedBuddies
+         = true </properties> </locator> </buddy>
+      -->
+
+      <!--
+
+         Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml ships with jgroups.jar and will be picked up by
+         the class loader.
+      -->
+      <jgroupsConfig configFile="udp.xml">
+         <!--
+            uncomment to define a JGroups stack here <PING timeout="2000" num_initial_members="3"/> <MERGE2 max_interval="30000" min_interval="10000"/>
+            <FD_SOCK/> <FD timeout="10000" max_tries="5" shun="true"/> <VERIFY_SUSPECT timeout="1500"/> <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+
+            retransmit_timeout="300,600,1200,2400,4800" discard_delivered_msgs="true"/> <UNICAST timeout="300,600,1200,2400,3600"/> <pbcast.STABLE
+            stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/> <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+            view_bundling="true" view_ack_collection_timeout="5000"/> <FRAG2 frag_size="60000"/> <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+
+            <pbcast.FLUSH timeout="0"/>
+         -->
+      </jgroupsConfig>
+   </clustering>
+
+   <!--
+
+      Eviction configuration. WakeupInterval defines how often the eviction
+      thread runs, in milliseconds. 0 means the eviction thread will never
+      run.
+   -->
+   <eviction wakeUpInterval="500">
+      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
+         <property name="maxNodes" value="1" />
+         <property name="timeToLive" value="5000" />
+      </default>
+
+      <!--
+         region name="/org/jboss/data1"> <property name="timeToLive" value="2000" /> </region> <region name="/org/jboss/data2"
+         algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000"> <property name="maxNodes" value="3000" /> <property
+         name="minTimeToLive" value="4000" /> </region
+      -->
+   </eviction>
+
+   <!--
+      Cache loaders. If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state is accessed again, it is
+      removed from the cache loader and loaded into memory. Otherwise, state is always maintained in the cache loader as well as in memory. Set 'shared' to true
+      if all instances in the cluster use the same cache loader instance, e.g., are talking to the same database.
+   -->
+   <!--
+   <loaders passivation="false" shared="false">
+      <preload>
+         <node fqn="/org/jboss" />
+         <node fqn="/org/tempdata" />
+      </preload>
+   -->
+   
+   <!--
+         we can have multiple cache loaders, which get chained
+   -->
+
+   <!--
+      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true" ignoreModifications="true" purgeOnStartup="true">
+
+      <properties> cache.jdbc.table.name=jbosscache cache.jdbc.table.create=true cache.jdbc.table.drop=true </properties> <singletonStore enabled="true"
+      class="org.jboss.cache.loader.SingletonStoreCacheLoader"> <properties> pushStateWhenCoordinator=true pushStateWhenCoordinatorTimeout=20000 </properties>
+
+      </singletonStore> </loader> </loaders>
+   -->
+
+   <!--
+      Define custom interceptors. All custom interceptors need to extend
+      org.jboss.cache.interceptors.base.CommandInterceptor
+   -->
+
+   <!--
+      <customInterceptors> <interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"> <property
+      name="attrOne" value="value1" /> <property name="attrTwo" value="value2" /> </interceptor> <interceptor position="last"
+      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor index="3"
+      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> <interceptor before="org.jboss.cache.interceptors.CallInterceptor"
+
+      class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/> <interceptor after="org.jboss.cache.interceptors.CallInterceptor"
+
+      class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/> </customInterceptors>
+   -->
+</jbosscache>
+

Deleted: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml	2009-12-15 12:31:47 UTC (rev 1056)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -1,181 +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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-  
-  <component>
-    <key>org.exoplatform.services.cache.CacheService</key>
-    <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
-
-  	<init-params>
-      <object-param>
-        <name>cache.config.default</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.ExoCacheConfig">
-          <field  name="name"><string>default</string></field>
-          <field  name="maxSize"><int>5</int></field>
-          <field  name="liveTime"><long>2</long></field>
-        </object>
-      </object-param>
-      <object-param>
-        <name>test-multi-threading</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheConfig">
-          <field  name="name"><string>test-multi-threading</string></field>
-          <field  name="maxNodes"><int>-1</int></field>
-          <field  name="minTimeToLive"><long>0</long></field>
-        </object>        
-      </object-param>      
-      <object-param>
-        <name>cacheDistributed</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.ExoCacheConfig">
-          <field  name="name"><string>cacheDistributed</string></field>
-          <field  name="maxSize"><int>5</int></field>
-          <field  name="liveTime"><long>2</long></field>
-          <field  name="distributed"><boolean>true</boolean></field>
-        </object>
-      </object-param>                
-      <object-param>
-        <name>test-default-impl</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.ExoCacheConfig">
-          <field  name="name"><string>test-default-impl</string></field>
-          <field  name="maxSize"><int>5</int></field>
-          <field  name="liveTime"><long>2</long></field>
-        </object>
-      </object-param>                
-      <object-param>
-        <name>test-custom-impl-with-old-config</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.ExoCacheConfig">
-          <field  name="name"><string>test-custom-impl-with-old-config</string></field>
-          <field  name="maxSize"><int>5</int></field>
-          <field  name="liveTime"><long>2</long></field>
-          <field  name="implementation"><string>TEST</string></field>
-        </object>
-      </object-param>                
-      <object-param>
-        <name>test-custom-impl-with-new-config</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.impl.jboss.TestExoCacheConfig">
-          <field  name="name"><string>test-custom-impl-with-new-config</string></field>
-          <field  name="maxSize"><int>5</int></field>
-          <field  name="liveTime"><long>2</long></field>
-        </object>
-      </object-param>
-       <object-param>
-        <name>test-fifo-with-old-config</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.ExoCacheConfig">
-          <field name="name"><string>test-fifo-with-old-config</string></field>
-          <field name="maxSize"><int>5</int></field>
-          <field name="liveTime"><long>1</long></field>
-          <field name="implementation"><string>FIFO</string></field>
-        </object>
-      </object-param>      
-       <object-param>
-        <name>test-fifo</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheConfig">
-          <field  name="name"><string>test-fifo</string></field>
-          <field  name="maxNodes"><int>5</int></field>
-          <field  name="minTimeToLive"><long>1000</long></field>
-        </object>
-      </object-param>    
-      <object-param>
-        <name>test-lru-with-old-config</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.ExoCacheConfig">
-          <field name="name"><string>test-lru-with-old-config</string></field>
-          <field name="maxSize"><int>5</int></field>
-          <field name="liveTime"><long>1</long></field>
-          <field name="implementation"><string>LRU</string></field>
-        </object>
-      </object-param> 
-       <object-param>
-        <name>test-lru</name>
-        <description>The default cache configuration</description>
-        <object type="org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheConfig">
-          <field name="name"><string>test-lru</string></field>
-          <field name="maxNodes"><int>5</int></field>
-          <field name="minTimeToLive"><long>1000</long></field>
-          <field name="maxAge"><long>2000</long></field>
-          <field name="timeToLive"><long>1500</long></field>
-        </object>
-      </object-param>                                  
-    </init-params>	
-  </component>  
-  
-  <component>
-    <key>org.exoplatform.services.cache.ExoCacheFactory</key>
-    <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
-    <init-params>
-      <value-param>
-        <name>cache.config.template</name>
-        <value>jar:/conf/portal/cache-configuration-template.xml</value>
-      </value-param>
-    </init-params>
-  </component>  
-    
-  <external-component-plugins>
-    <target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
-    <component-plugin>
-      <name>addConfig</name>
-      <set-method>addConfig</set-method>
-      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryConfigPlugin</type>
-      <description>add Custom Configurations</description>
-      <init-params>	
-	      <value-param>
-	        <name>myCustomCache</name>
-	        <value>jar:/conf/portal/distributed-cache-configuration-template.xml</value>
-	      </value-param>    		          
-      </init-params>	
-    </component-plugin>    
-    <component-plugin>
-      <name>addCreator</name>
-      <set-method>addCreator</set-method>
-      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheCreatorPlugin</type>
-      <description>add Exo Cache Creator</description>
-      <init-params>	
-	      <object-param>
-		        <name>Test</name>
-		        <description>The cache creator for testing purpose</description>
-		        <object type="org.exoplatform.services.cache.impl.jboss.TestExoCacheCreator"></object>
-		    </object-param>      
-	      <object-param>
-		        <name>FIFO</name>
-		        <description>The fifo cache creator</description>
-		        <object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheCreator"></object>
-		    </object-param>
-	      <object-param>
-		        <name>LRU</name>
-		        <description>The lru cache creator</description>
-		        <object type="org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator">
-		        	<field name="defaultTimeToLive"><long>1500</long></field>
-		        	<field name="defaultMaxAge"><long>2000</long></field>	
-		        </object>
-		    </object-param>  		          
-      </init-params>	
-    </component-plugin>
-  </external-component-plugins>  
-</configuration>

Copied: kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml (from rev 1056, kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml)
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.component.ext.cache.impl.jboss.v3/src/test/resources/conf/portal/test-configuration.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -0,0 +1,181 @@
+<?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.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+  
+  <component>
+    <key>org.exoplatform.services.cache.CacheService</key>
+    <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+
+  	<init-params>
+      <object-param>
+        <name>cache.config.default</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.ExoCacheConfig">
+          <field  name="name"><string>default</string></field>
+          <field  name="maxSize"><int>5</int></field>
+          <field  name="liveTime"><long>2</long></field>
+        </object>
+      </object-param>
+      <object-param>
+        <name>test-multi-threading</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheConfig">
+          <field  name="name"><string>test-multi-threading</string></field>
+          <field  name="maxNodes"><int>-1</int></field>
+          <field  name="minTimeToLive"><long>0</long></field>
+        </object>        
+      </object-param>      
+      <object-param>
+        <name>cacheDistributed</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.ExoCacheConfig">
+          <field  name="name"><string>cacheDistributed</string></field>
+          <field  name="maxSize"><int>5</int></field>
+          <field  name="liveTime"><long>2</long></field>
+          <field  name="distributed"><boolean>true</boolean></field>
+        </object>
+      </object-param>                
+      <object-param>
+        <name>test-default-impl</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.ExoCacheConfig">
+          <field  name="name"><string>test-default-impl</string></field>
+          <field  name="maxSize"><int>5</int></field>
+          <field  name="liveTime"><long>2</long></field>
+        </object>
+      </object-param>                
+      <object-param>
+        <name>test-custom-impl-with-old-config</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.ExoCacheConfig">
+          <field  name="name"><string>test-custom-impl-with-old-config</string></field>
+          <field  name="maxSize"><int>5</int></field>
+          <field  name="liveTime"><long>2</long></field>
+          <field  name="implementation"><string>TEST</string></field>
+        </object>
+      </object-param>                
+      <object-param>
+        <name>test-custom-impl-with-new-config</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.impl.jboss.TestExoCacheConfig">
+          <field  name="name"><string>test-custom-impl-with-new-config</string></field>
+          <field  name="maxSize"><int>5</int></field>
+          <field  name="liveTime"><long>2</long></field>
+        </object>
+      </object-param>
+       <object-param>
+        <name>test-fifo-with-old-config</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.ExoCacheConfig">
+          <field name="name"><string>test-fifo-with-old-config</string></field>
+          <field name="maxSize"><int>5</int></field>
+          <field name="liveTime"><long>1</long></field>
+          <field name="implementation"><string>FIFO</string></field>
+        </object>
+      </object-param>      
+       <object-param>
+        <name>test-fifo</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheConfig">
+          <field  name="name"><string>test-fifo</string></field>
+          <field  name="maxNodes"><int>5</int></field>
+          <field  name="minTimeToLive"><long>1000</long></field>
+        </object>
+      </object-param>    
+      <object-param>
+        <name>test-lru-with-old-config</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.ExoCacheConfig">
+          <field name="name"><string>test-lru-with-old-config</string></field>
+          <field name="maxSize"><int>5</int></field>
+          <field name="liveTime"><long>1</long></field>
+          <field name="implementation"><string>LRU</string></field>
+        </object>
+      </object-param> 
+       <object-param>
+        <name>test-lru</name>
+        <description>The default cache configuration</description>
+        <object type="org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheConfig">
+          <field name="name"><string>test-lru</string></field>
+          <field name="maxNodes"><int>5</int></field>
+          <field name="minTimeToLive"><long>1000</long></field>
+          <field name="maxAge"><long>2000</long></field>
+          <field name="timeToLive"><long>1500</long></field>
+        </object>
+      </object-param>                                  
+    </init-params>	
+  </component>  
+  
+  <component>
+    <key>org.exoplatform.services.cache.ExoCacheFactory</key>
+    <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
+    <init-params>
+      <value-param>
+        <name>cache.config.template</name>
+        <value>jar:/conf/portal/cache-configuration-template.xml</value>
+      </value-param>
+    </init-params>
+  </component>  
+    
+  <external-component-plugins>
+    <target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
+    <component-plugin>
+      <name>addConfig</name>
+      <set-method>addConfig</set-method>
+      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryConfigPlugin</type>
+      <description>add Custom Configurations</description>
+      <init-params>	
+	      <value-param>
+	        <name>myCustomCache</name>
+	        <value>jar:/conf/portal/distributed-cache-configuration-template.xml</value>
+	      </value-param>    		          
+      </init-params>	
+    </component-plugin>    
+    <component-plugin>
+      <name>addCreator</name>
+      <set-method>addCreator</set-method>
+      <type>org.exoplatform.services.cache.impl.jboss.ExoCacheCreatorPlugin</type>
+      <description>add Exo Cache Creator</description>
+      <init-params>	
+	      <object-param>
+		        <name>Test</name>
+		        <description>The cache creator for testing purpose</description>
+		        <object type="org.exoplatform.services.cache.impl.jboss.TestExoCacheCreator"></object>
+		    </object-param>      
+	      <object-param>
+		        <name>FIFO</name>
+		        <description>The fifo cache creator</description>
+		        <object type="org.exoplatform.services.cache.impl.jboss.fifo.FIFOExoCacheCreator"></object>
+		    </object-param>
+	      <object-param>
+		        <name>LRU</name>
+		        <description>The lru cache creator</description>
+		        <object type="org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator">
+		        	<field name="defaultTimeToLive"><long>1500</long></field>
+		        	<field name="defaultMaxAge"><long>2000</long></field>	
+		        </object>
+		    </object-param>  		          
+      </init-params>	
+    </component-plugin>
+  </external-component-plugins>  
+</configuration>

Modified: kernel/branches/config-branch/exo.kernel.component.remote/pom.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.component.remote/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.component.remote/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,7 +25,7 @@
    <parent>
       <groupId>org.exoplatform.kernel</groupId>
       <artifactId>kernel-parent</artifactId>
-      <version>2.2.0-Beta04</version>
+      <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <artifactId>exo.kernel.component.remote</artifactId>

Modified: kernel/branches/config-branch/exo.kernel.container/pom.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.container/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -25,7 +25,7 @@
    <parent>
       <groupId>org.exoplatform.kernel</groupId>
       <artifactId>kernel-parent</artifactId>
-      <version>2.2.0-Beta04</version>
+      <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <artifactId>exo.kernel.container</artifactId>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/client/http/ClientTypeMap.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/client/http/ClientTypeMap.java	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/client/http/ClientTypeMap.java	2009-12-15 13:36:16 UTC (rev 1059)
@@ -94,7 +94,7 @@
             String preferredMimeType = (String)preferredMimeTypeExp.evaluate(node, XPathConstants.STRING);
             String renderer = (String)rendererExp.evaluate(node, XPathConstants.STRING);
             HttpClientType clientInfo;
-            if (renderer != null || renderer.length() > 0)
+            if (renderer != null && renderer.length() > 0)
             {
                clientInfo = new HttpClientType(name, userAgentPattern, preferredMimeType, renderer);
             }

Modified: kernel/branches/config-branch/packaging/module/pom.xml
===================================================================
--- kernel/branches/config-branch/packaging/module/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/packaging/module/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -2,7 +2,7 @@
    <parent>
        <groupId>org.exoplatform.kernel</groupId>
        <artifactId>kernel-parent</artifactId>
-       <version>2.2.0-Beta04</version>
+       <version>2.2.0-Beta05-SNAPSHOT</version>
    </parent>
 
    <modelVersion>4.0.0</modelVersion>

Modified: kernel/branches/config-branch/pom.xml
===================================================================
--- kernel/branches/config-branch/pom.xml	2009-12-15 13:35:49 UTC (rev 1058)
+++ kernel/branches/config-branch/pom.xml	2009-12-15 13:36:16 UTC (rev 1059)
@@ -30,7 +30,7 @@
 
    <groupId>org.exoplatform.kernel</groupId>
    <artifactId>kernel-parent</artifactId>
-   <version>2.2.0-Beta04</version>
+   <version>2.2.0-Beta05-SNAPSHOT</version>
    <packaging>pom</packaging>
 
    <name>eXo Kernel</name>
@@ -42,9 +42,9 @@
    </properties>
 
    <scm>
-      <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/kernel/tags/2.2.0-Beta04</connection>
-      <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/kernel/tags/2.2.0-Beta04</developerConnection>
-      <url>http://fisheye.jboss.org/browse/exo-jcr/kernel/tags/2.2.0-Beta04</url>
+      <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk</connection>
+      <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/kernel/trunk</developerConnection>
+      <url>http://fisheye.jboss.org/browse/exo-jcr/kernel/trunk</url>
    </scm>
 
    <modules>
@@ -53,6 +53,7 @@
       <module>exo.kernel.component.common</module>
       <module>exo.kernel.component.remote</module>
       <module>exo.kernel.component.cache</module>
+      <module>exo.kernel.component.ext.cache.impl.jboss.v3</module>
       <module>exo.kernel.component.command</module>
       <module>packaging/module</module>
    </modules>
@@ -78,8 +79,13 @@
             <groupId>org.exoplatform.kernel</groupId>
             <artifactId>exo.kernel.component.remote</artifactId>
             <version>${project.version}</version>
-         </dependency>
+         </dependency>
          <dependency>
+            <groupId>org.exoplatform.kernel</groupId>
+            <artifactId>exo.kernel.component.cache</artifactId>
+            <version>${project.version}</version>
+         </dependency>         
+         <dependency>
             <groupId>xpp3</groupId>
             <artifactId>xpp3</artifactId>
             <version>1.1.3.4.O</version>
@@ -163,9 +169,14 @@
          <dependency>
             <groupId>jgroups</groupId>
             <artifactId>jgroups</artifactId>
-            <version>2.6.10.GA</version>
+            <version>2.6.12.GA</version>
          </dependency>
-          <dependency>
+         <dependency>
+            <groupId>org.jboss.cache</groupId>
+            <artifactId>jbosscache-core</artifactId>
+            <version>3.2.0.GA</version>            
+         </dependency>         
+         <dependency>
             <groupId>org.jibx</groupId>
             <artifactId>jibx-bind</artifactId>
             <version>${jibx.plugin.version}</version>



More information about the exo-jcr-commits mailing list