[jboss-cvs] JBossAS SVN: r104407 - in trunk/testsuite/src/main/org/jboss/test: cluster/testutil and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 3 18:23:46 EDT 2010
Author: bstansberry at jboss.com
Date: 2010-05-03 18:23:45 -0400 (Mon, 03 May 2010)
New Revision: 104407
Modified:
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java
trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java
trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java
trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelperMBean.java
trunk/testsuite/src/main/org/jboss/test/cluster/web/JBossCacheConfigTestSetupDelegate.java
trunk/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java
Log:
[JBAS-7560] Remove POJO Cache stuff from testsuite's CacheHelper
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java 2010-05-03 22:19:43 UTC (rev 104406)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java 2010-05-03 22:23:45 UTC (rev 104407)
@@ -35,7 +35,6 @@
import org.apache.commons.httpclient.methods.GetMethod;
import org.jboss.test.cluster.testutil.SessionTestUtil;
import org.jboss.test.cluster.testutil.WebTestBase;
-import org.jboss.test.cluster.web.CacheHelper;
import org.jboss.test.cluster.web.JBossClusteredWebTestCase;
/**
@@ -57,7 +56,6 @@
protected String setUrlBase_;
protected String getUrlBase_;
protected String invalidateUrlBase_;
- private String warFqn_;
private boolean usingBuddyReplication_;
private Set<HttpClient> clients = new HashSet<HttpClient>();
@@ -182,7 +180,6 @@
getLog().debug(setUrl + ":::::::" + getUrl);
- MBeanServerConnection[] adaptors = getAdaptors();
// Create an instance of HttpClient.
HttpClient client = new HttpClient();
clients.add(client);
@@ -234,8 +231,7 @@
// Make sure the cache is not stopped during redeploy due to
// no services using it. Tell CacheHelper to hold a ref.
String cacheConfigName = System.getProperty(SessionTestUtil.CACHE_CONFIG_PROP, "standard-session-cache");
- String usePojoCache = System.getProperty(SessionTestUtil.CACHE_TYPE_PROP, "false");
- SessionTestUtil.setCacheConfigName(adaptors[0], cacheConfigName, Boolean.parseBoolean(usePojoCache));
+ SessionTestUtil.setCacheConfigName(adaptors[0], cacheConfigName);
}
sleep(2000);
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java 2010-05-03 22:19:43 UTC (rev 104406)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java 2010-05-03 22:23:45 UTC (rev 104407)
@@ -291,12 +291,12 @@
STRING_ONLY_TYPES);
}
- public static void setCacheConfigName(MBeanServerConnection adaptor, String cacheConfigName, boolean usePojoCache) throws Exception
+ public static void setCacheConfigName(MBeanServerConnection adaptor, String cacheConfigName) throws Exception
{
adaptor.invoke(CacheHelper.OBJECT_NAME,
"setCacheConfigName",
- new Object[] { cacheConfigName, Boolean.valueOf(usePojoCache) },
- new String[]{ String.class.getName(), boolean.class.getName() });
+ new Object[] { cacheConfigName },
+ new String[]{ String.class.getName() });
}
@SuppressWarnings("unchecked")
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java 2010-05-03 22:19:43 UTC (rev 104406)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java 2010-05-03 22:23:45 UTC (rev 104407)
@@ -25,7 +25,6 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
import javax.management.ObjectName;
@@ -36,8 +35,6 @@
import org.jboss.cache.Node;
import org.jboss.cache.buddyreplication.BuddyManager;
import org.jboss.ha.framework.server.CacheManagerLocator;
-import org.jboss.ha.framework.server.PojoCacheManager;
-import org.jboss.ha.framework.server.PojoCacheManagerLocator;
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.system.ServiceMBeanSupport;
@@ -58,7 +55,6 @@
implements CacheHelperMBean
{
public static final String CACHE_CONFIG_PROP = "jbosstest.cluster.web.cache.config";
- public static final String CACHE_TYPE_PROP = "jbosstest.cluster.web.cache.pojo";
public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.test:service=WebTestCacheHelper");
@@ -67,26 +63,18 @@
private String cacheConfigName;
private Cache cache;
- private boolean usePojoCache;
+// private boolean usePojoCache;
public CacheHelper()
{
}
- public static Cache getCacheInstance(String cacheConfig, boolean usePojoCache)
+ public static Cache getCacheInstance(String cacheConfig)
{
try
{
- if (usePojoCache)
- {
- PojoCacheManager cm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
- return cm.getPojoCache(cacheConfig, true).getCache();
- }
- else
- {
- CacheManager cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
- return cm.getCache(cacheConfig, true);
- }
+ CacheManager cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
+ return cm.getCache(cacheConfig, true);
}
catch (RuntimeException re)
{
@@ -98,12 +86,11 @@
}
}
- public void setCacheConfigName(String cacheConfigName, boolean usePojoCache)
+ public void setCacheConfigName(String cacheConfigName)
{
if (this.cacheConfigName == null || !this.cacheConfigName.equals(cacheConfigName))
releaseCache();
this.cacheConfigName = cacheConfigName;
- this.usePojoCache = usePojoCache;
getCache();
}
@@ -222,15 +209,8 @@
super.startService();
cacheConfigName = System.getProperty(CACHE_CONFIG_PROP);
- String pojo = System.getProperty(CACHE_TYPE_PROP, "false");
- usePojoCache = Boolean.parseBoolean(pojo);
- getLog().debug("cacheConfigName=" + cacheConfigName +
- " and usePojoCache=" + usePojoCache);
-
- // Force a gc to try to clear weak refs that screw up pojocache tests
- if (usePojoCache)
- System.gc();
+ getLog().debug("cacheConfigName=" + cacheConfigName);
}
public void stopService() throws Exception
@@ -243,16 +223,8 @@
{
if (cache != null && cacheConfigName != null)
{
- if (usePojoCache)
- {
- PojoCacheManager cm = PojoCacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
- cm.releaseCache(cacheConfigName);
- }
- else
- {
- CacheManager cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
- cm.releaseCache(cacheConfigName);
- }
+ CacheManager cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
+ cm.releaseCache(cacheConfigName);
cache = null;
}
@@ -279,9 +251,8 @@
if (cache == null)
{
- getLog().debug("Getting cache: cacheConfigName=" + cacheConfigName +
- " and usePojoCache=" + usePojoCache);
- cache = getCacheInstance(cacheConfigName, usePojoCache);
+ getLog().debug("Getting cache: cacheConfigName=" + cacheConfigName);
+ cache = getCacheInstance(cacheConfigName);
if (cache.getCacheStatus() != CacheStatus.STARTED)
cache.start();
}
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelperMBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelperMBean.java 2010-05-03 22:19:43 UTC (rev 104406)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelperMBean.java 2010-05-03 22:23:45 UTC (rev 104407)
@@ -25,7 +25,7 @@
public interface CacheHelperMBean
{
- void setCacheConfigName(String cacheConfigName, boolean usePojoCache);
+ void setCacheConfigName(String cacheConfigName);
Object getSessionVersion(String sessionFqn);
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/JBossCacheConfigTestSetupDelegate.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/JBossCacheConfigTestSetupDelegate.java 2010-05-03 22:19:43 UTC (rev 104406)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/JBossCacheConfigTestSetupDelegate.java 2010-05-03 22:23:45 UTC (rev 104407)
@@ -26,7 +26,6 @@
private static final Logger log = Logger.getLogger(JBossCacheConfigTestSetupDelegate.class);
private String cacheConfigName;
- private String usePojoCache;
private JBossTestClusteredServices clusteredServices;
public void setTestServices(JBossTestServices services)
@@ -40,9 +39,8 @@
public void setUp() throws Exception
{
- cacheConfigName = System.getProperty(SessionTestUtil.CACHE_CONFIG_PROP);
- usePojoCache = System.getProperty(SessionTestUtil.CACHE_TYPE_PROP, "false");
- if (cacheConfigName != null || Boolean.parseBoolean(usePojoCache))
+ cacheConfigName = System.getProperty(SessionTestUtil.CACHE_CONFIG_PROP);
+ if (cacheConfigName != null)
{
setServerSideCacheConfigProperties();
}
@@ -59,7 +57,7 @@
private void setServerSideCacheConfigProperties() throws Exception
{
- log.debug("configuring server with cacheConfigName=" + cacheConfigName + " and usePojoCache=" + usePojoCache);
+ log.debug("configuring server with cacheConfigName=" + cacheConfigName);
ObjectName on = new ObjectName(SYSTEM_PROPS_SVC);
for (MBeanServerConnection adaptor : clusteredServices.getAdaptors())
@@ -67,10 +65,6 @@
adaptor.invoke(on, "set",
new Object[]{SessionTestUtil.CACHE_CONFIG_PROP, cacheConfigName},
new String[] {String.class.getName(), String.class.getName()});
-
- adaptor.invoke(on, "set",
- new Object[]{SessionTestUtil.CACHE_TYPE_PROP, usePojoCache},
- new String[] {String.class.getName(), String.class.getName()});
}
}
Modified: trunk/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java 2010-05-03 22:19:43 UTC (rev 104406)
+++ trunk/testsuite/src/main/org/jboss/test/web/test/ClusteredSingleSignOnUnitTestCase.java 2010-05-03 22:23:45 UTC (rev 104407)
@@ -292,8 +292,8 @@
{
adaptor.invoke(CacheHelper.OBJECT_NAME,
"setCacheConfigName",
- new Object[] { "clustered-sso", Boolean.FALSE },
- new String[] { String.class.getName(), boolean.class.getName() });
+ new Object[] { "clustered-sso" },
+ new String[] { String.class.getName() });
Boolean b = (Boolean) adaptor.invoke(CacheHelper.OBJECT_NAME, "getCacheHasSSO",
new Object[] { ssoId },
More information about the jboss-cvs-commits
mailing list