[jboss-cvs] JBossAS SVN: r95433 - in branches/Branch_5_x/testsuite/src: resources/cluster/web/cachehelper and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 22 13:31:55 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-10-22 13:31:55 -0400 (Thu, 22 Oct 2009)
New Revision: 95433
Modified:
branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java
branches/Branch_5_x/testsuite/src/resources/cluster/web/cachehelper/jboss-beans.xml
Log:
Allow test framework to deal with cache aliases
Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java 2009-10-22 17:27:45 UTC (rev 95432)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/cluster/web/TestConfigurationAdder.java 2009-10-22 17:31:55 UTC (rev 95433)
@@ -22,9 +22,11 @@
package org.jboss.test.cluster.web;
+import java.util.Map;
+
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.ConfigurationRegistry;
import org.jboss.cache.config.Configuration.CacheMode;
-import org.jboss.cache.config.ConfigurationRegistry;
/**
* Utility that analyzes the set of available cache configurations in
@@ -39,6 +41,7 @@
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;
@@ -46,8 +49,10 @@
public void start() throws Exception
{
- createAlternates(standardSessionConfig, configurationRegistry.getConfiguration(standardSessionConfig));
- createAlternates(fieldSessionConfig, configurationRegistry.getConfiguration(fieldSessionConfig));
+ 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));
}
private void createAlternates(String stdName, Configuration std) throws Exception
@@ -94,7 +99,16 @@
public void setConfigurationRegistry(ConfigurationRegistry configurationRegistry)
{
this.configurationRegistry = configurationRegistry;
+ }
+ public Map<String, String> getConfigurationAliases()
+ {
+ return configurationAliases;
}
+ public void setConfigurationAliases(Map<String, String> configurationAliases)
+ {
+ this.configurationAliases = configurationAliases;
+ }
+
public String getStandardSessionConfig()
{
return standardSessionConfig;
Modified: branches/Branch_5_x/testsuite/src/resources/cluster/web/cachehelper/jboss-beans.xml
===================================================================
--- branches/Branch_5_x/testsuite/src/resources/cluster/web/cachehelper/jboss-beans.xml 2009-10-22 17:27:45 UTC (rev 95432)
+++ branches/Branch_5_x/testsuite/src/resources/cluster/web/cachehelper/jboss-beans.xml 2009-10-22 17:31:55 UTC (rev 95433)
@@ -7,7 +7,7 @@
class="org.jboss.test.cluster.web.TestConfigurationAdder">
<property name="configurationRegistry"><inject bean="CacheConfigurationRegistry"/></property>
-
+ <property name="configurationAliases"><inject bean="CacheManager" property="configAliases"/></property>
</bean>
<bean name="ClusterTestCacheHelper" class="org.jboss.test.cluster.web.CacheHelper">
More information about the jboss-cvs-commits
mailing list