[jboss-cvs] JBossAS SVN: r102926 - in trunk: testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 24 18:07:57 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-03-24 18:07:57 -0400 (Wed, 24 Mar 2010)
New Revision: 102926

Removed:
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/FieldBasedMaxUnreplicatedIntervalTestCase.java
Modified:
   trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/ClusteredSessionUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/ClusteringDefaultsDeployer.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
   trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
Log:
[JBAS-7560] Remove FIELD granularity web session replication

Modified: trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml
===================================================================
--- trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml	2010-03-24 22:07:57 UTC (rev 102926)
@@ -49,44 +49,6 @@
        </loaders> 
     </cache-config>
     
-    <cache-config name="field-granularity-session-cache">
-       <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" 
-             nodeLockingScheme="pessimistic" useLockStriping="false"/>
-       <transaction transactionManagerLookupClass="org.jboss.cache.transaction.BatchModeTransactionManagerLookup"/>
-       <serialization useRegionBasedMarshalling="true"/>
-       <startup regionsInactiveOnStartup="true"/>
-       <clustering clusterName="${jboss.partition.name:DefaultPartition}-FieldSessionCache" mode="replication">
-         <stateRetrieval fetchInMemoryState="true" timeout="60000"/>
-         <jgroupsConfig multiplexerStack="${jboss.default.jgroups.stack:udp}"/>
-         <!-- Choose sync or async -->
-         <async serializationExecutorPoolSize="0"/>
-         <!-- <sync replTimeout="17500"/> -->
-       
-         <buddy enabled="false" poolName="default" communicationTimeout="17500">
-            <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
-            <locator>
-            <properties>
-               numBuddies=1
-               ignoreColocatedBuddies=true
-            </properties>
-            </locator>
-          </buddy>
-       </clustering>
-       <listeners asyncPoolSize="0"/>
-       <jmxStatistics enabled="true"/>
-       
-       <loaders passivation="true" shared="false">
-          <loader class="org.jboss.cache.loader.FileCacheLoader" async="false" 
-             fetchPersistentState="true" purgeOnStartup="true">
-             <properties>
-             location=${jboss.server.data.dir}${/}field-session
-             ignoreModifications=false
-             checkCharacterPortability=false
-             </properties>
-          </loader>
-       </loaders>
-    </cache-config>
-    
     <cache-config name="sfsb-cache">
        <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" 
              nodeLockingScheme="pessimistic" useLockStriping="false"/>

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/ClusteredSessionUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/ClusteredSessionUnitTestCase.java	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/ClusteredSessionUnitTestCase.java	2010-03-24 22:07:57 UTC (rev 102926)
@@ -77,12 +77,6 @@
       assertTrue(sess.isOutdated());
       sess.setCreationTime(System.currentTimeMillis());
       assertFalse(sess.isOutdated());
-      
-      mgr.setReplicationGranularity(ReplicationGranularity.FIELD);
-      sess = (ClusteredSession) mgr.createEmptySession();
-      assertTrue(sess.isOutdated());
-      sess.setCreationTime(System.currentTimeMillis());
-      assertFalse(sess.isOutdated());
    }
 
 }

Deleted: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/FieldBasedMaxUnreplicatedIntervalTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/FieldBasedMaxUnreplicatedIntervalTestCase.java	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/FieldBasedMaxUnreplicatedIntervalTestCase.java	2010-03-24 22:07:57 UTC (rev 102926)
@@ -1,59 +0,0 @@
-/*
- * 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.test.cluster.defaultcfg.simpleweb.test;
-
-import junit.framework.Test;
-
-import org.jboss.metadata.web.jboss.ReplicationGranularity;
-import org.jboss.test.cluster.testutil.CacheConfigTestSetup;
-
-/**
- * Tests of handling of ClusteredSession.maxUnreplicatedInterval. This version
- * is run with FIELD granularity.
- * 
- * @author Brian Stansberry
- */
-public class FieldBasedMaxUnreplicatedIntervalTestCase 
-   extends AttributeBasedMaxUnreplicatedIntervalTestCase
-{      
-   /**
-    * Create a new MaxUnreplicatedIntervalTestCase.
-    * 
-    * @param name
-    */
-   public FieldBasedMaxUnreplicatedIntervalTestCase(String name)
-   {
-      super(name);
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return CacheConfigTestSetup.getTestSetup(FieldBasedMaxUnreplicatedIntervalTestCase.class, dcmFactories, false, null, !useBuddyRepl, true);
-   }
-   
-   protected ReplicationGranularity getReplicationGranularity()
-   {
-      return ReplicationGranularity.FIELD;
-   }   
-
-}

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java	2010-03-24 22:07:57 UTC (rev 102926)
@@ -38,21 +38,17 @@
 public class TestConfigurationAdder
 {
    public static final String DEFAULT_STD_SESSION_CFG = "standard-session-cache";
-   public static final String DEFAULT_FIELD_SESSION_CFG = "field-granularity-session-cache";
    
    private ConfigurationRegistry configurationRegistry;
    private Map<String, String> configurationAliases;
    private String standardSessionConfig = DEFAULT_STD_SESSION_CFG;
-   private String fieldSessionConfig = DEFAULT_FIELD_SESSION_CFG;
    private boolean addAlternateCacheMode;
    private boolean addAlternateBuddyReplication;
    
    public void start() throws Exception
    {
       String alias = configurationAliases == null ? null : configurationAliases.get(standardSessionConfig);
-      createAlternates(standardSessionConfig, configurationRegistry.getConfiguration(alias == null ? standardSessionConfig : alias));      
-      alias = configurationAliases == null ? null : configurationAliases.get(fieldSessionConfig);
-      createAlternates(fieldSessionConfig, configurationRegistry.getConfiguration(alias == null? fieldSessionConfig : alias));      
+      createAlternates(standardSessionConfig, configurationRegistry.getConfiguration(alias == null ? standardSessionConfig : alias));
    }
 
    private void createAlternates(String stdName, Configuration std) throws Exception
@@ -117,14 +113,6 @@
    {
       this.standardSessionConfig = standardSessionConfig;
    }
-   public String getFieldSessionConfig()
-   {
-      return fieldSessionConfig;
-   }
-   public void setFieldSessionConfig(String fieldSessionConfig)
-   {
-      this.fieldSessionConfig = fieldSessionConfig;
-   }
    public boolean isAddAlternateCacheMode()
    {
       return addAlternateCacheMode;

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/ClusteringDefaultsDeployer.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/ClusteringDefaultsDeployer.java	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/ClusteringDefaultsDeployer.java	2010-03-24 22:07:57 UTC (rev 102926)
@@ -47,12 +47,10 @@
    public static final int IGNORED = -1;
    
    private String cacheName;
-   private String fieldGranularityCacheName;
    private SnapshotMode snapshotMode;
    private int snapshotInterval;
    private ReplicationGranularity replicationGranularity;
    private ReplicationTrigger replicationTrigger;
-   private boolean replicationFieldBatchMode = true;
    private Boolean useJK;
    private int maxUnreplicatedInterval;
    private boolean useSessionPassivation;
@@ -90,16 +88,6 @@
       this.cacheName = cacheName;
    }
 
-   public String getFieldGranularityCacheName()
-   {
-      return fieldGranularityCacheName;
-   }
-
-   public void setFieldGranularityCacheName(String fieldGranularityCacheName)
-   {
-      this.fieldGranularityCacheName = fieldGranularityCacheName;
-   }
-
    public SnapshotMode getSnapshotMode()
    {
       return snapshotMode;
@@ -133,6 +121,10 @@
 
    public void setReplicationGranularity(ReplicationGranularity granularity)
    {
+      if (granularity == ReplicationGranularity.FIELD)
+      {
+         throw new IllegalArgumentException("FIELD replication-granularity is no longer supported");
+      }
       this.replicationGranularity = granularity;
    }
 
@@ -146,16 +138,6 @@
       this.replicationTrigger = trigger;
    }
 
-   public boolean isReplicationFieldBatchMode()
-   {
-      return replicationFieldBatchMode;
-   }
-
-   public void setReplicationFieldBatchMode(boolean fieldBatchMode)
-   {
-      this.replicationFieldBatchMode = fieldBatchMode;
-   }
-
    public boolean isUseLocalCache()
    {
       return useLocalCache;
@@ -268,14 +250,10 @@
          repCfg.setReplicationGranularity(this.replicationGranularity);
       if (repCfg.getReplicationTrigger() == null)
          repCfg.setReplicationTrigger(this.replicationTrigger);
-      if (repCfg.getReplicationFieldBatchMode() == null)
-         repCfg.setReplicationFieldBatchMode(Boolean.valueOf(this.replicationFieldBatchMode));
 
       if (repCfg.getCacheName() == null)
       {
-         String cacheConfig = ReplicationGranularity.FIELD == repCfg.getReplicationGranularity() 
-                                                           ? fieldGranularityCacheName : cacheName;
-         repCfg.setCacheName(cacheConfig);
+         repCfg.setCacheName(cacheName);
       }
       
       if (repCfg.getMaxUnreplicatedInterval() == null)

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java	2010-03-24 22:07:57 UTC (rev 102926)
@@ -198,7 +198,7 @@
       
       this.replicationConfig_ = webMetaData.getReplicationConfig();
       this.replicationTrigger_ = replicationConfig_.getReplicationTrigger();
-      this.replicationGranularity_ = replicationConfig_.getReplicationGranularity();
+      setReplicationGranularity(replicationConfig_.getReplicationGranularity());
       
       // Only configure JK usage if it was explicitly set; otherwise
       // wait until we're starting when we can check for a jvmRoute
@@ -1306,6 +1306,10 @@
     */
    public void setReplicationGranularity(ReplicationGranularity granularity)
    {
+      if (granularity == ReplicationGranularity.FIELD)
+      {
+         throw new IllegalArgumentException("FIELD replication-granularity is no longer supported");
+      }
       this.replicationGranularity_ = granularity;
    }
 

Modified: trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
===================================================================
--- trunk/tomcat/src/resources/war-deployers-jboss-beans.xml	2010-03-24 21:31:48 UTC (rev 102925)
+++ trunk/tomcat/src/resources/war-deployers-jboss-beans.xml	2010-03-24 22:07:57 UTC (rev 102926)
@@ -67,8 +67,6 @@
       
       <!-- Default session cache config used by distributable webapps -->
       <property name="cacheName">standard-session-cache</property>
-      <!-- Default session cache config used by FIELD granularity distributable webapps -->      
-      <property name="fieldGranularityCacheName">field-granularity-session-cache</property>
       
       <!--
       The following two properties define when sessions are replicated to 
@@ -79,18 +77,13 @@
       The "interval" mode uses a background thread that periodically checks for
       modified sessions and replicates them.  The "SnapshotInterval"
       property controls how often (in milliseconds) the background thread
-      should run.   
-      
-      Note that this property is not in effect if the replication-granularity
-      is set to FIELD. If it is FIELD, it will be per http request (that is, 
-      "instant" mode.)
+      should run.
       -->
       <property name="snapshotMode">INSTANT</property>
       <property name="snapshotInterval">1000</property>
       
       <property name="replicationGranularity">SESSION</property>
       <property name="replicationTrigger">SET_AND_NON_PRIMITIVE_GET</property>
-      <property name="replicationFieldBatchMode">true</property>
       
       <!--
       Whether by default to add special session handling to coordinate use 




More information about the jboss-cvs-commits mailing list