[jboss-cvs] JBossAS SVN: r71290 - in projects/ejb3/branches/cluster-dev/cache-jbc2/src/test: java/org and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 26 01:08:25 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-03-26 01:08:25 -0400 (Wed, 26 Mar 2008)
New Revision: 71290

Added:
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/backing/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/backing/jbc2/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/backing/jbc2/GroupedPassivatingUnitTestCase.java
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockCluster.java
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockClusterMember.java
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jbc2-configs.xml
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jgroups-stacks.xml
Modified:
   projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/log4j.xml
Log:
[EJBTHREE-1026] Add foundation for JBC2 testing

Added: projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/backing/jbc2/GroupedPassivatingUnitTestCase.java
===================================================================
--- projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/backing/jbc2/GroupedPassivatingUnitTestCase.java	                        (rev 0)
+++ projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/impl/backing/jbc2/GroupedPassivatingUnitTestCase.java	2008-03-26 05:08:25 UTC (rev 71290)
@@ -0,0 +1,223 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.jboss.ejb3.test.cache.impl.backing.jbc2;
+
+import org.jboss.ejb3.test.cache.integrated.Ejb3CacheTestCaseBase;
+import org.jboss.ejb3.test.cache.jbc2.mock.JBC2MockCluster;
+import org.jboss.ejb3.test.cache.jbc2.mock.JBC2MockClusterMember;
+import org.jboss.ejb3.test.cache.mock.CacheType;
+import org.jboss.ejb3.test.cache.mock.MockBeanContainer;
+import org.jboss.ejb3.test.cache.mock.MockBeanContext;
+import org.jboss.ejb3.test.cache.mock.MockCacheConfig;
+import org.jboss.ejb3.test.cache.mock.MockEntity;
+import org.jboss.ejb3.test.cache.mock.MockPassivationManager;
+import org.jboss.ejb3.test.cache.mock.MockXPC;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author Brian Stansberry
+ * @version $Revision: 65920 $
+ */
+public class GroupedPassivatingUnitTestCase extends Ejb3CacheTestCaseBase
+{
+   private static final Logger log = Logger.getLogger(GroupedPassivatingUnitTestCase.class);
+   
+   public void testSimpleGroupPassivation() throws Exception
+   {      
+      log.info("====== testSimpleGroupPassivation() ======");
+      
+      JBC2MockCluster cluster = new JBC2MockCluster(false);
+      JBC2MockClusterMember node0 = cluster.getNode0();
+      MockCacheConfig cacheConfig = new MockCacheConfig();
+      cacheConfig.setIdleTimeoutSeconds(1);
+      MockXPC sharedXPC = new MockXPC("XPCA");
+      MockBeanContainer container1 = node0.deployBeanContainer("MockBeanContainer1", null, CacheType.DISTRIBUTED, cacheConfig, sharedXPC.getName());
+      MockBeanContainer container2 = node0.deployBeanContainer("MockBeanContainer2", "MockBeanContainer1", CacheType.DISTRIBUTED, cacheConfig, sharedXPC.getName());
+      
+      node0.setTCCL();
+      try
+      {
+         Object key1 = container1.getCache().create(null, null);
+         MockBeanContext firstCtx1;
+         MockBeanContext ctx1 = firstCtx1 = container1.getCache().get(key1);
+         
+         Object key2 = ctx1.getChild(container2.getName());
+         MockBeanContext ctx2 = container2.getCache().get(key2);
+         
+         assertNotNull(ctx1.getXPC());
+         assertEquals(ctx1.getXPC(), ctx2.getXPC());
+         
+         container2.getCache().finished(ctx2);
+         container1.getCache().finished(ctx1);
+         
+         sleep(2100);
+         
+         MockPassivationManager pass1 = (MockPassivationManager) container1.getPassivationManager();
+         MockPassivationManager pass2 = (MockPassivationManager) container2.getPassivationManager();
+         
+         assertEquals("ctx1 should have been passivated", 1, pass1.getPrePassivateCount());
+         assertEquals("ctx2 should have been passivated", 1, pass2.getPrePassivateCount());
+         
+         ctx2 = container2.getCache().get(key2);
+         
+         log.info("ctx2 = " + ctx2);
+         assertNotNull(ctx2);
+         
+         assertEquals("ctx2 should not have been postReplicated", 0, pass2.getPostReplicateCount());        
+         assertEquals("ctx2 should have been activated", 1, pass2.getPostActivateCount());
+         
+         ctx1 = container1.getCache().get(key1);
+         
+         log.info("ctx1 = " + ctx1);
+         assertNotNull(ctx1);
+         
+         assertEquals("ctx1 should not have been postReplicated", 0, pass1.getPostReplicateCount());        
+         assertEquals("ctx1 should have been activated", 1, pass1.getPostActivateCount());
+         
+         assertTrue("ctx1 must be different than firstCtx1 (else no passivation has taken place)", ctx1 != firstCtx1);
+         
+         assertNotNull(ctx1.getXPC());
+         assertSame(ctx1.getXPC(), ctx2.getXPC());
+      }
+      finally
+      {
+         try
+         {
+            container1.stop();
+            container2.stop();
+         }
+         finally
+         {
+            node0.restoreTCCL();
+         }
+      }
+   }
+   
+   public void testSimpleGroupReplication() throws Exception
+   {      
+      log.info("====== testSimpleGroupReplication() ======");
+      
+      JBC2MockCluster cluster = new JBC2MockCluster(false);
+      MockCacheConfig cacheConfig = new MockCacheConfig();
+      cacheConfig.setIdleTimeoutSeconds(1);
+      MockXPC sharedXPC = new MockXPC("XPCA");
+      MockBeanContainer[] firstSet = cluster.deployBeanContainer("MockBeanContainer1", null, CacheType.DISTRIBUTED, cacheConfig, sharedXPC.getName(), sharedXPC.getName());
+      MockBeanContainer[] secondSet = cluster.deployBeanContainer("MockBeanContainer2", "MockBeanContainer1", CacheType.DISTRIBUTED, cacheConfig, sharedXPC.getName(), sharedXPC.getName());
+      MockBeanContainer container1A = firstSet[0];
+      MockBeanContainer container1B = firstSet[1];
+      MockBeanContainer container2A = secondSet[0];
+      MockBeanContainer container2B = secondSet[1];
+      
+      Object key1 = null;
+      Object key2 = null;
+      MockEntity entityA = null;
+      
+      // Use the TCCL to focus on the 1st node
+      cluster.getNode0().setTCCL();
+      try
+      {
+         key1 = container1A.getCache().create(null, null);
+         MockBeanContext ctx1A = container1A.getCache().get(key1);
+         
+         key2 = ctx1A.getChild(container2A.getName());
+         MockBeanContext ctx2A = container2A.getCache().get(key2);
+         
+         assertNotNull(ctx1A.getXPC());
+         assertSame(ctx1A.getXPC(), ctx2A.getXPC());
+         
+         entityA = ctx2A.createEntity();
+         assertSame(entityA, ctx1A.getEntity());
+         
+         container2A.getCache().finished(ctx2A);
+         container1A.getCache().finished(ctx1A);
+         
+         MockPassivationManager pass1A = (MockPassivationManager) container1A.getPassivationManager();
+         MockPassivationManager pass2A = (MockPassivationManager) container2A.getPassivationManager();
+         
+         assertEquals("ctx1 should have been replicated", 1, pass1A.getPreReplicateCount());
+         assertEquals("ctx2 should have been passivated", 1, pass2A.getPreReplicateCount());
+         
+         ctx2A = container2A.getCache().get(key2);
+         
+         log.info("ctx2 = " + ctx2A);
+         assertNotNull(ctx2A);
+         
+         assertEquals("ctx2 should have been postReplicated", 1, pass2A.getPostReplicateCount());        
+         assertEquals("ctx2 should not have been activated", 0, pass2A.getPostActivateCount());
+         
+         ctx1A = container1A.getCache().get(key1);
+         
+         log.info("ctx1 = " + ctx1A);
+         assertNotNull(ctx1A);
+         
+         assertEquals("ctx1 should have been postReplicated", 1, pass1A.getPostReplicateCount());        
+         assertEquals("ctx1 should not have been activated", 0, pass1A.getPostActivateCount());
+         
+         assertNotNull(ctx1A.getXPC());
+         assertSame(ctx1A.getXPC(), ctx2A.getXPC());
+         
+         MockEntity entity1x = ctx1A.getEntity();
+         assertEquals(entityA, entity1x);
+         
+         container1A.getCache().finished(ctx1A);         
+         container2A.getCache().finished(ctx2A);
+      }
+      catch (Exception e)
+      {
+         container1A.stop();
+         container2A.stop();
+         throw e;
+      }
+      finally
+      {
+         cluster.getNode0().restoreTCCL();         
+      }
+      
+      // Switch to second node
+      cluster.getNode1().setTCCL();
+      try
+      {
+         MockBeanContext ctx1B = container1B.getCache().get(key1);         
+         MockBeanContext ctx2B = container2B.getCache().get(key2);
+         
+         MockEntity entityB = ctx2B.getEntity();
+         assertSame(entityB, ctx1B.getEntity());
+         assertEquals(entityA, entityB);
+         assertNotSame(entityA, entityB);
+         
+         container2B.getCache().finished(ctx2B);         
+         container1B.getCache().finished(ctx1B);
+      }
+      catch (Exception e)
+      {
+         container1B.stop();
+         container2B.stop();
+         throw e;
+      }
+      finally
+      {
+         cluster.getNode1().restoreTCCL();         
+      }
+   }
+}

Added: projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockCluster.java
===================================================================
--- projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockCluster.java	                        (rev 0)
+++ projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockCluster.java	2008-03-26 05:08:25 UTC (rev 71290)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.jboss.ejb3.test.cache.jbc2.mock;
+
+import javax.transaction.TransactionManager;
+
+import org.jboss.cache.CacheManagerImpl;
+import org.jboss.ejb3.cache.impl.backing.jbc2.JBCIntegratedObjectStoreSource;
+import org.jboss.ejb3.test.cache.mock.CacheType;
+import org.jboss.ejb3.test.cache.mock.MockBeanContainer;
+import org.jboss.ejb3.test.cache.mock.MockBeanContext;
+import org.jboss.ejb3.test.cache.mock.MockCacheConfig;
+import org.jboss.ejb3.test.cache.mock.tm.MockTransactionManager;
+import org.jgroups.JChannelFactory;
+
+/**
+ * @author Brian Stansberry
+ *
+ */
+public class JBC2MockCluster
+{
+   public static final String JGROUPS_STACKS = "test-jgroups-stacks.xml";
+   public static final String JBC_CONFIGS = "test-jbc2-configs.xml";
+   
+   private TransactionManager tm0;
+   private TransactionManager tm1;
+   private JBCIntegratedObjectStoreSource<MockBeanContext> storeSource0;
+   private JBCIntegratedObjectStoreSource<MockBeanContext> storeSource1;
+   private JBC2MockClusterMember node0;
+   private JBC2MockClusterMember node1;
+   
+   public JBC2MockCluster(boolean useCoordinator) throws Exception
+   {
+      this(MockTransactionManager.getInstance("node0"),
+           MockTransactionManager.getInstance("node1"), 
+           useCoordinator, CacheType.DISTRIBUTED);
+   }
+   
+   public JBC2MockCluster(TransactionManager tm0, TransactionManager tm1, boolean useCoordinator, CacheType cacheType) throws Exception
+   {
+      this(tm0, tm1, useCoordinator, new CacheType[] { cacheType});
+   }
+   
+   public JBC2MockCluster(TransactionManager tm0, TransactionManager tm1, boolean useCoordinator, CacheType[] availableTypes) throws Exception
+   {
+      this.tm0 = tm0;
+      this.tm1 = tm1;
+      
+      JChannelFactory channelFactory0 = new JChannelFactory();
+      channelFactory0.setMultiplexerConfig(JGROUPS_STACKS);
+      CacheManagerImpl mgr0 = new CacheManagerImpl(JBC_CONFIGS, channelFactory0);
+      mgr0.start();
+      storeSource0 = new JBCIntegratedObjectStoreSource<MockBeanContext>();
+      storeSource0.setCacheManager(mgr0);
+      
+      JChannelFactory channelFactory1 = new JChannelFactory();
+      channelFactory1.setMultiplexerConfig(JGROUPS_STACKS);
+      CacheManagerImpl mgr1 = new CacheManagerImpl(JBC_CONFIGS, channelFactory1);
+      mgr1.start();
+      storeSource1 = new JBCIntegratedObjectStoreSource<MockBeanContext>();
+      storeSource1.setCacheManager(mgr1);
+      
+      node0 = new JBC2MockClusterMember(tm0, useCoordinator, availableTypes, storeSource0);
+      node1 = new JBC2MockClusterMember(tm1, useCoordinator, availableTypes, storeSource1);
+   }
+
+   public TransactionManager getTm0()
+   {
+      return tm0;
+   }
+
+   public TransactionManager getTm1()
+   {
+      return tm1;
+   }
+
+   public JBC2MockClusterMember getNode0()
+   {
+      return node0;
+   }
+
+   public JBC2MockClusterMember getNode1()
+   {
+      return node1;
+   }
+   
+   public MockBeanContainer[] deployBeanContainer(String containerName, String parentContainerName,
+         CacheType cacheType, MockCacheConfig cacheConfig, boolean useXPC) throws Exception
+   {
+      return deployBeanContainer(containerName, parentContainerName, cacheType, cacheConfig, "xpc0", "xpc1");
+   }
+   
+   public MockBeanContainer[] deployBeanContainer(String containerName, String parentContainerName,
+         CacheType cacheType, MockCacheConfig cacheConfig, String xpc0, String xpc1) throws Exception
+   {
+      MockBeanContainer[] result = new MockBeanContainer[2];
+      result[0] = node0.deployBeanContainer(containerName, parentContainerName, cacheType, cacheConfig, xpc0);
+      result[1] = node1.deployBeanContainer(containerName, parentContainerName, cacheType, cacheConfig, xpc1);
+      return result;
+   }
+   
+}

Added: projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockClusterMember.java
===================================================================
--- projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockClusterMember.java	                        (rev 0)
+++ projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/java/org/jboss/ejb3/test/cache/jbc2/mock/JBC2MockClusterMember.java	2008-03-26 05:08:25 UTC (rev 71290)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.jboss.ejb3.test.cache.jbc2.mock;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.transaction.TransactionManager;
+
+import org.jboss.ejb3.annotation.CacheConfig;
+import org.jboss.ejb3.cache.api.CacheFactoryNotRegisteredException;
+import org.jboss.ejb3.cache.impl.backing.jbc2.JBCIntegratedObjectStoreSource;
+import org.jboss.ejb3.cache.spi.IntegratedObjectStoreSource;
+import org.jboss.ejb3.cache.spi.impl.AbstractStatefulCacheFactory;
+import org.jboss.ejb3.test.cache.mock.CacheType;
+import org.jboss.ejb3.test.cache.mock.MockBeanContainer;
+import org.jboss.ejb3.test.cache.mock.MockBeanContext;
+import org.jboss.ejb3.test.cache.mock.MockCacheConfig;
+import org.jboss.ejb3.test.cache.mock.MockEjb3System;
+
+/**
+ * @author Brian Stansberry
+ */
+public class JBC2MockClusterMember extends MockEjb3System
+{
+   public static final String DEFAULT_JBC_CONFIG = "standard-session";
+   private static final Map<String, String> DEFAULT_ALIAS_MAP = new HashMap<String, String>();
+   
+   static
+   {
+      DEFAULT_ALIAS_MAP.put(CacheConfig.DEFAULT_CLUSTERED_OBJECT_NAME, DEFAULT_JBC_CONFIG);
+   }
+   
+   public static Map<String, String> getAliasMap()
+   {
+      return new HashMap<String, String>(DEFAULT_ALIAS_MAP);
+   }
+   
+   private ClassLoader localClassLoader;
+   private JBCIntegratedObjectStoreSource<MockBeanContext> storeSource;
+   
+   public JBC2MockClusterMember(TransactionManager tm, 
+                            boolean useCoordinator, 
+                            CacheType cacheType,
+                            JBCIntegratedObjectStoreSource<MockBeanContext> storeSource)
+   {
+      this(tm, useCoordinator, new CacheType[] {cacheType}, storeSource);
+   }
+   
+   public JBC2MockClusterMember(TransactionManager tm, 
+                            boolean useCoordinator, 
+                            CacheType[] cacheTypes,
+                            JBCIntegratedObjectStoreSource<MockBeanContext> storeSource)
+   {
+      this(tm, useCoordinator, cacheTypes, storeSource, DEFAULT_JBC_CONFIG, getAliasMap());
+   }
+
+   public JBC2MockClusterMember(TransactionManager tm, 
+         boolean useCoordinator, 
+         CacheType[] availableTypes,
+         JBCIntegratedObjectStoreSource<MockBeanContext> storeSource,
+         String defaultJBCConfig,
+         Map<String, String> aliases)
+   {
+      super(tm, useCoordinator, availableTypes);
+      this.storeSource = storeSource;
+      
+      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+      localClassLoader = new ClassLoader(tccl) {};
+      
+      // Kluge. Rebuild the distributed factory, as the superclass
+      // didn't have the maps available when it did it
+      for (CacheType type : availableTypes)
+      {
+         if (type == CacheType.DISTRIBUTED)
+            getCacheFactoryRegistry().addCacheFactory(type.mapKey(), buildCacheFactory(type));
+      }
+      
+      try
+      {
+         AbstractStatefulCacheFactory<MockBeanContext> distFactory = (AbstractStatefulCacheFactory<MockBeanContext>) getCacheFactoryRegistry().getCacheFactory(CacheType.DISTRIBUTED.mapKey());
+         distFactory.setDefaultCacheConfigName(defaultJBCConfig);
+         distFactory.setCacheConfigAliases(aliases);
+      }
+      catch (CacheFactoryNotRegisteredException e)
+      {
+        // no distributed cache!
+      }
+   }
+
+   public ClassLoader getLocalClassLoader()
+   {
+      return localClassLoader;
+   }   
+   
+   public boolean setTCCL()
+   {
+      if (localClassLoader == Thread.currentThread().getContextClassLoader())
+         return false;
+      Thread.currentThread().setContextClassLoader(localClassLoader);
+      return true;
+   }
+   
+   public void restoreTCCL()
+   {
+      ClassLoader current = Thread.currentThread().getContextClassLoader();
+      if (current == localClassLoader)
+      {
+         Thread.currentThread().setContextClassLoader(localClassLoader.getParent());
+      }
+      else if (current != localClassLoader.getParent())
+      {
+         throw new IllegalStateException("Current TCCL is neither localClassLoader nor its parent");
+      }
+   }
+
+   @Override
+   protected IntegratedObjectStoreSource<MockBeanContext> getDistributedStoreSource()
+   {
+      return storeSource;
+   }
+
+   @Override
+   public MockBeanContainer deployBeanContainer(String containerName, String parentContainerName,
+         CacheType cacheType, MockCacheConfig cacheConfig, String xpc) throws Exception
+   {
+      boolean tcclSet = setTCCL();
+      try
+      {
+         return super.deployBeanContainer(containerName, parentContainerName, cacheType, cacheConfig, xpc);
+      }
+      finally
+      {
+         if (tcclSet)
+            restoreTCCL();
+      }
+   }
+
+   @Override
+   public MockBeanContainer getMockBeanContainer(String containerName)
+   {
+      boolean tcclSet = setTCCL();
+      try
+      {
+         return super.getMockBeanContainer(containerName);
+      }
+      finally
+      {
+         if (tcclSet)
+            restoreTCCL();
+      }
+   }
+   
+}

Modified: projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/log4j.xml
===================================================================
--- projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/log4j.xml	2008-03-26 05:06:41 UTC (rev 71289)
+++ projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/log4j.xml	2008-03-26 05:08:25 UTC (rev 71290)
@@ -114,8 +114,12 @@
 
   <!-- Limit JBoss categories to INFO -->
   <category name="org.jboss">
-    <priority value="INFO" class="org.jboss.logging.XLevel"/>
+    <priority value="INFO"/>
   </category>
+  
+  <category name="org.jgroups">
+    <priority value="INFO"/>
+  </category>
 
   <!-- Increase the priority threshold for the DefaultDS category
   <category name="DefaultDS">

Added: projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jbc2-configs.xml
===================================================================
--- projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jbc2-configs.xml	                        (rev 0)
+++ projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jbc2-configs.xml	2008-03-26 05:08:25 UTC (rev 71290)
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ - JBoss, Home of Professional Open Source.
+ - Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ - as indicated by the @author tags. See the copyright.txt file in the
+ - distribution for a full listing of individual contributors.
+ -
+ - 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.
+ -->
+<cache-configs>
+
+    <!-- 
+     Various JBoss Cache configurations, representing different valid
+     configurations for session caching
+    -->    
+        
+    <!-- The default.  If you change this, change buddy-repl-session below
+         to match. -->
+    <cache-config name="standard-session">
+
+      <attribute name="MultiplexerStack">udp</attribute>
+      <attribute name="ClusterName">standard-session</attribute>
+      
+      <!--
+              Node locking level : SERIALIZABLE
+                                   REPEATABLE_READ (default)
+                                   READ_COMMITTED
+                                   READ_UNCOMMITTED
+                                   NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--     Valid modes are LOCAL
+                               REPL_ASYNC
+                               REPL_SYNC
+      -->
+      <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+      <!--    The max amount of time (in milliseconds) we wait until the
+            initial state (ie. the contents of the cache) are retrieved from
+            existing members. -->
+      <attribute name="StateRetrievalTimeout">60000</attribute>
+
+      <!--    Number of milliseconds to wait until all responses for a
+              synchronous call have been received.  -->
+      <attribute name="SyncReplTimeout">17500</attribute>
+
+      <!--  Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+      <attribute name="ExposeManagementStatistics">true</attribute>
+
+     <!-- We want to activate/inactivate regions as beans are deployed -->
+      <attribute name="UseRegionBasedMarshalling">true</attribute>
+      <!-- Must match the value of "useRegionBasedMarshalling" -->
+      <attribute name="InactiveOnStartup">true</attribute>    
+      
+      <!--  Eviction policy configurations. -->
+      <attribute name="EvictionPolicyConfig">
+         <config>
+            <!-- Don't evict automatically -->
+            <attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>
+            <attribute name="wakeUpIntervalSeconds">5</attribute>
+            <!-- Set up the _default_region -->
+            <region name="/_default_"/>
+            <!-- EJB3 integration code will programatically create other
+                 regions as beans are deployed -->
+         </config>
+      </attribute>
+      
+      <attribute name="BuddyReplicationConfig">
+         <config>
+            <buddyReplicationEnabled>false</buddyReplicationEnabled>
+            
+            <!-- these are the default values anyway -->
+            <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>            
+            <!-- numBuddies is the number of backup nodes each node maintains.  
+                 ignoreColocatedBuddies means that each node will *try* to 
+                 select a buddy on a different physical host.  If not able 
+                 to do so though, it will fall back to colocated nodes. -->
+            <buddyLocatorProperties>
+               numBuddies = 1
+               ignoreColocatedBuddies = true
+            </buddyLocatorProperties>
+
+            <!-- A way to specify a preferred replication group.  If specified, 
+                 we try and pick a buddy why shares the same pool name (falling 
+                 back to other buddies if not available).  This allows the 
+                 sysdmin to hint at backup buddies are picked, so for example, 
+                 nodes may be hinted topick buddies on a different physical rack
+                 or power supply for added fault tolerance.  -->
+            <buddyPoolName>default</buddyPoolName>
+            
+            <!-- Communication timeout for buddy repl related messages like 
+                 data gravitation and assigning to and removing from groups -->
+            <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
+
+            <!-- Do not modify the following elements -->
+            <autoDataGravitation>false</autoDataGravitation>
+            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+         </config>
+      
+      </attribute>
+
+      <!-- Store passivated sessions to the file system -->
+      <attribute name="CacheLoaderConfig">
+          <config>              
+              <passivation>true</passivation>
+              <shared>false</shared>
+
+              <cacheloader>
+                  <class>org.jboss.cache.loader.FileCacheLoader</class>
+                  <!-- Passivate to the server data dir -->
+                  <properties>
+                       location=${jboss.server.data.dir}${/}sfsb 
+                  </properties>
+                  <async>false</async>
+                  <fetchPersistentState>true</fetchPersistentState>
+                  <ignoreModifications>false</ignoreModifications>
+                  <checkCharacterPortability>false</checkCharacterPortability>
+              </cacheloader>
+          </config>
+      </attribute>
+
+    </cache-config> 
+       
+    <!-- Identical to standard-session but with buddy replication enabled -->
+    <cache-config name="buddy-repl-session">
+
+      <attribute name="MultiplexerStack">udp</attribute>
+      <attribute name="ClusterName">buddy-repl-session</attribute>
+      
+      <!--
+              Node locking level : SERIALIZABLE
+                                   REPEATABLE_READ (default)
+                                   READ_COMMITTED
+                                   READ_UNCOMMITTED
+                                   NONE
+      -->
+      <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+      <!--     Valid modes are LOCAL
+                               REPL_ASYNC
+                               REPL_SYNC
+      -->
+      <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+      <!--    The max amount of time (in milliseconds) we wait until the
+            initial state (ie. the contents of the cache) are retrieved from
+            existing members. -->
+      <attribute name="StateRetrievalTimeout">60000</attribute>
+
+      <!--    Number of milliseconds to wait until all responses for a
+              synchronous call have been received.  -->
+      <attribute name="SyncReplTimeout">17500</attribute>
+
+      <!--  Max number of milliseconds to wait for a lock acquisition -->
+      <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+      <attribute name="ExposeManagementStatistics">true</attribute>
+
+     <!-- We want to activate/inactivate regions as beans are deployed -->
+      <attribute name="UseRegionBasedMarshalling">true</attribute>
+      <!-- Must match the value of "useRegionBasedMarshalling" -->
+      <attribute name="InactiveOnStartup">true</attribute>    
+      
+      <!--  Eviction policy configurations. -->
+      <attribute name="EvictionPolicyConfig">
+         <config>
+            <!-- Don't evict automatically -->
+            <attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>
+            <attribute name="wakeUpIntervalSeconds">5</attribute>
+            <!-- Set up the _default_region -->
+            <region name="/_default_"/>
+            <!-- EJB3 integration code will programatically create other
+                 regions as beans are deployed -->
+         </config>
+      </attribute>
+      
+      <attribute name="BuddyReplicationConfig">
+         <config>
+            <buddyReplicationEnabled>false</buddyReplicationEnabled>
+            
+            <!-- these are the default values anyway -->
+            <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>            
+            <!-- numBuddies is the number of backup nodes each node maintains.  
+                 ignoreColocatedBuddies means that each node will *try* to 
+                 select a buddy on a different physical host.  If not able 
+                 to do so though, it will fall back to colocated nodes. -->
+            <buddyLocatorProperties>
+               numBuddies = 1
+               ignoreColocatedBuddies = true
+            </buddyLocatorProperties>
+
+            <!-- A way to specify a preferred replication group.  If specified, 
+                 we try and pick a buddy why shares the same pool name (falling 
+                 back to other buddies if not available).  This allows the 
+                 sysdmin to hint at backup buddies are picked, so for example, 
+                 nodes may be hinted topick buddies on a different physical rack
+                 or power supply for added fault tolerance.  -->
+            <buddyPoolName>default</buddyPoolName>
+            
+            <!-- Communication timeout for buddy repl related messages like 
+                 data gravitation and assigning to and removing from groups -->
+            <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
+
+            <!-- Do not modify the following elements -->
+            <autoDataGravitation>false</autoDataGravitation>
+            <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+            <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+         </config>
+      
+      </attribute>
+
+      <!-- Store passivated sessions to the file system -->
+      <attribute name="CacheLoaderConfig">
+          <config>              
+              <passivation>true</passivation>
+              <shared>false</shared>
+
+              <cacheloader>
+                  <class>org.jboss.cache.loader.FileCacheLoader</class>
+                  <!-- Passivate to the server data dir -->
+                  <properties>
+                       location=${jboss.server.data.dir}${/}sfsb 
+                  </properties>
+                  <async>false</async>
+                  <fetchPersistentState>true</fetchPersistentState>
+                  <ignoreModifications>false</ignoreModifications>
+                  <checkCharacterPortability>false</checkCharacterPortability>
+              </cacheloader>
+          </config>
+      </attribute>
+
+    </cache-config> 
+</cache-configs>

Added: projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jgroups-stacks.xml
===================================================================
--- projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jgroups-stacks.xml	                        (rev 0)
+++ projects/ejb3/branches/cluster-dev/cache-jbc2/src/test/resources/test-jgroups-stacks.xml	2008-03-26 05:08:25 UTC (rev 71290)
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Hibernate, Relational Persistence for Idiomatic Java
+  ~
+  ~ Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
+  ~ indicated by the @author tags or express copyright attribution
+  ~ statements applied by the authors.  All third-party contributions are
+  ~ distributed under license by Red Hat Middleware LLC.
+  ~
+  ~ This copyrighted material is made available to anyone wishing to use, modify,
+  ~ copy, or redistribute it subject to the terms and conditions of the GNU
+  ~ Lesser General Public License, as published by the Free Software Foundation.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  ~ for more details.
+  ~
+  ~ You should have received a copy of the GNU Lesser General Public License
+  ~ along with this distribution; if not, write to:
+  ~ Free Software Foundation, Inc.
+  ~ 51 Franklin Street, Fifth Floor
+  ~ Boston, MA  02110-1301  USA
+  -->
+
+<!--
+  Sample file that defines a number of stacks, used by the multiplexer
+  Author: Bela Ban
+  Version: $Id: jgroups-stacks.xml 14257 2007-12-23 14:46:37Z bstansberry at jboss.com $
+-->
+<protocol_stacks>
+    <stack name="udp"
+           description="Default: IP multicast based stack, with flow control and message bundling">
+        <config>
+            <UDP
+                 mcast_addr="${jgroups.udp.mcast_addr:228.10.10.10}"
+                 mcast_port="${jgroups.udp.mcast_port:45588}"
+                 tos="8"
+                 ucast_recv_buf_size="20000000"
+                 ucast_send_buf_size="640000"
+                 mcast_recv_buf_size="25000000"
+                 mcast_send_buf_size="640000"
+                 loopback="true"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 ip_ttl="${jgroups.udp.ip_ttl:2}"
+                 enable_bundling="${jgroup.udp.enable_bundling:true}"
+                 
+                 use_concurrent_stack="true"
+
+		         thread_pool.enabled="true"
+		         thread_pool.min_threads="1"
+		         thread_pool.max_threads="25"
+		         thread_pool.keep_alive_time="5000"
+		         thread_pool.queue_enabled="false"
+		         thread_pool.queue_max_size="100"
+		         thread_pool.rejection_policy="Run"
+		
+		         oob_thread_pool.enabled="true"
+		         oob_thread_pool.min_threads="1"
+		         oob_thread_pool.max_threads="8"
+		         oob_thread_pool.keep_alive_time="5000"
+		         oob_thread_pool.queue_enabled="false"
+		         oob_thread_pool.queue_max_size="100"
+		         oob_thread_pool.rejection_policy="Run"/>		         
+            <PING timeout="${jgroups.ping.timeout:2000}"
+                    num_initial_members="${jgroups.ping.num_initial_members:3}"/>
+            <MERGE2 max_interval="100000"
+                      min_interval="20000"/>
+            <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="false"/>
+            <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="3000"  
+                        shun="false"
+                        view_bundling="true"
+                        view_ack_collection_timeout="5000"/>
+            <FC max_credits="2000000"
+                min_threshold="0.10"/>
+            <FRAG2 frag_size="60000"  />
+			<pbcast.STREAMING_STATE_TRANSFER/>
+	        <!-- <pbcast.STATE_TRANSFER/> -->
+	        <pbcast.FLUSH timeout="0"/>        
+	    </config>
+    </stack>
+
+
+
+    <stack name="udp-sync"
+           description="IP multicast based stack, without flow control and without message bundling. This should be used
+           instead of udp if (1) synchronous calls are used and (2) the message volume (rate and size)
+            is not that large. Don't use this configuration if you send messages at a high sustained rate, or you might
+            run out of memory">
+        <config>
+            <UDP
+                 mcast_addr="${jgroups.udp.mcast_addr:229.10.10.10}"
+                 mcast_port="${jgroups.udp.mcast_port:45599}"
+                 tos="8"
+                 ucast_recv_buf_size="20000000"
+                 ucast_send_buf_size="640000"
+                 mcast_recv_buf_size="25000000"
+                 mcast_send_buf_size="640000"
+                 loopback="true"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 ip_ttl="${jgroups.udp.ip_ttl:2}"
+                 enable_bundling="${jgroup.udp.enable_bundling:true}"
+                 
+                 use_concurrent_stack="true"
+
+		         thread_pool.enabled="true"
+		         thread_pool.min_threads="1"
+		         thread_pool.max_threads="25"
+		         thread_pool.keep_alive_time="5000"
+		         thread_pool.queue_enabled="false"
+		         thread_pool.queue_max_size="100"
+		         thread_pool.rejection_policy="Run"
+		
+		         oob_thread_pool.enabled="true"
+		         oob_thread_pool.min_threads="1"
+		         oob_thread_pool.max_threads="8"
+		         oob_thread_pool.keep_alive_time="5000"
+		         oob_thread_pool.queue_enabled="false"
+		         oob_thread_pool.queue_max_size="100"
+		         oob_thread_pool.rejection_policy="Run"/> 		         
+            <PING timeout="${jgroups.ping.timeout:2000}"
+                    num_initial_members="${jgroups.ping.num_initial_members:3}"/>
+            <MERGE2 max_interval="100000"
+                      min_interval="20000"/>
+            <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="false"/>
+            <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="3000" 
+                        shun="false"
+                        view_bundling="true"/>
+            <FRAG2 frag_size="60000"  />
+            <pbcast.STREAMING_STATE_TRANSFER/>
+	        <!-- <pbcast.STATE_TRANSFER/> -->
+	        <pbcast.FLUSH timeout="0"/>
+        </config>
+    </stack>
+
+
+    <stack name="tcp"
+           description="TCP based stack, with flow control and message bundling. This is usually used when IP
+           multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast).
+           Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g.
+           -Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]">
+        <config>
+            <TCP start_port="7800"
+                 loopback="true"
+                 recv_buf_size="20000000"
+                 send_buf_size="640000"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 enable_bundling="true"
+                 use_send_queues="false"
+                 sock_conn_timeout="300"
+                 skip_suspected_members="true"
+                 
+                 use_concurrent_stack="true"
+	
+		         thread_pool.enabled="true"
+		         thread_pool.min_threads="1"
+		         thread_pool.max_threads="25"
+		         thread_pool.keep_alive_time="5000"
+		         thread_pool.queue_enabled="false"
+		         thread_pool.queue_max_size="100"
+		         thread_pool.rejection_policy="run"
+		
+		         oob_thread_pool.enabled="true"
+		         oob_thread_pool.min_threads="1"
+		         oob_thread_pool.max_threads="8"
+		         oob_thread_pool.keep_alive_time="5000"
+		         oob_thread_pool.queue_enabled="false"
+		         oob_thread_pool.queue_max_size="100"
+		         oob_thread_pool.rejection_policy="run"/>
+		         
+            <TCPPING timeout="3000"
+                     initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7800],localhost[7801]}"
+                     port_range="1"
+                     num_initial_members="3"/>
+            <MERGE2 max_interval="100000"
+                      min_interval="20000"/>
+            <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="false"/>
+            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+                           max_bytes="400000"/>
+            <pbcast.GMS print_local_addr="true" 
+                        join_timeout="3000" 
+                        shun="false"
+                        view_bundling="true"/>
+            <FC max_credits="2000000"
+                min_threshold="0.10"/>
+            <FRAG2 frag_size="60000"  />
+            <pbcast.STREAMING_STATE_TRANSFER/>
+	        <!-- <pbcast.STATE_TRANSFER/> -->
+	        <pbcast.FLUSH timeout="0"/>
+        </config>
+    </stack>
+
+
+    <stack name="tcp-sync"
+           description="TCP based stack, without flow control and without message bundling. This is usually used when IP
+           multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast). This
+           configuration should be used instead of tcp when (1) synchronous calls are used and (2) the message volume
+           (rate and size) is not that large">
+        <config>
+            <TCP start_port="7900"
+                 loopback="true"
+                 recv_buf_size="20000000"
+                 send_buf_size="640000"
+                 discard_incompatible_packets="true"
+                 max_bundle_size="64000"
+                 max_bundle_timeout="30"
+                 use_incoming_packet_handler="true"
+                 enable_bundling="true"
+                 use_send_queues="false"
+                 sock_conn_timeout="300"
+                 skip_suspected_members="true"
+                 
+                 thread_pool.enabled="true"
+		         thread_pool.min_threads="1"
+		         thread_pool.max_threads="25"
+		         thread_pool.keep_alive_time="5000"
+		         thread_pool.queue_enabled="false"
+		         thread_pool.queue_max_size="100"
+		         thread_pool.rejection_policy="run"
+		
+		         oob_thread_pool.enabled="true"
+		         oob_thread_pool.min_threads="1"
+		         oob_thread_pool.max_threads="8"
+		         oob_thread_pool.keep_alive_time="5000"
+		         oob_thread_pool.queue_enabled="false"
+		         oob_thread_pool.queue_max_size="100"
+		         oob_thread_pool.rejection_policy="run"/>
+		         
+            <TCPPING timeout="3000"
+                     initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7900],localhost[7901]}"
+                     port_range="1"
+                     num_initial_members="3"/>
+            <MERGE2 max_interval="100000"
+                      min_interval="20000"/>
+            <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="false"/>
+            <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+                           max_bytes="400000"/>
+            <pbcast.GMS print_local_addr="true" 
+                        join_timeout="3000" 
+                        shun="false"
+                        view_bundling="true"/>
+            <pbcast.STREAMING_STATE_TRANSFER/>
+	        <!-- <pbcast.STATE_TRANSFER/> -->
+	        <pbcast.FLUSH timeout="0"/>
+        </config>
+    </stack>
+
+
+</protocol_stacks>
+
+




More information about the jboss-cvs-commits mailing list