[jboss-cvs] JBossAS SVN: r99291 - in projects/jboss-classpool/trunk: classpool/src/main/java/org/jboss/classpool/plugins and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jan 12 10:42:50 EST 2010


Author: kabir.khan at jboss.com
Date: 2010-01-12 10:42:49 -0500 (Tue, 12 Jan 2010)
New Revision: 99291

Added:
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentFirstDelegatingClassPoolTestCase.java
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentLastDelegatingClassPoolTestCase.java
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedScopedSiblingDelegatingClassPoolTestCase.java
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedSimpleDelegatingClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedArchiveClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedCtClassCreationTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalDomainClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalParentLoaderClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedModuleDependencyClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedPackageDependencyClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportModuleClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportPackageClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReplaceReferencesClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedRepositoryClassPoolTestCase.java
   projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedUsesPackageClassPoolTestCase.java
   projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedCtClassCreationTestCase.java
   projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedRepositoryClassPoolTestCase.java
Modified:
   projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/base/CtClassCacheFactory.java
   projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/plugins/DelegatingClassPool.java
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/RealCtCacheTestCase.java
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleCtCacheTestCase.java
   projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleDelegatingClassPoolTestCase.java
Log:
[JBREFLECT-92] Turn off caching by default, and add extra tests with caching enabled

Modified: projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/base/CtClassCacheFactory.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/base/CtClassCacheFactory.java	2010-01-12 15:40:59 UTC (rev 99290)
+++ projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/base/CtClassCacheFactory.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -75,7 +75,10 @@
    public static CtClassCacheFactory createFromProperties(Properties properties)
    {
       CtClassCacheFactory initializer = new CtClassCacheFactory();
-      String policy = properties.getProperty(POLICY_CLASS, TimedCachePolicy.class.getName());
+      String policy = properties.getProperty(POLICY_CLASS, null);
+      if (policy == null)
+         return null;
+      
       try
       {
          Class<?> clazz = Class.forName(policy);

Modified: projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/plugins/DelegatingClassPool.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/plugins/DelegatingClassPool.java	2010-01-12 15:40:59 UTC (rev 99290)
+++ projects/jboss-classpool/trunk/classpool/src/main/java/org/jboss/classpool/plugins/DelegatingClassPool.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -64,7 +64,7 @@
       if (logger.isTraceEnabled()) logger.trace(this + " domain:" + this);
       this.domain = domain;
       this.domain.addClassPool(this);
-      cachedLookups = factory.createCache();
+      cachedLookups = factory != null ? factory.createCache() : null;
    }
 
    public CtClass loadLocally(String classname, String resourceName, boolean create)
@@ -94,14 +94,18 @@
    //TODO KABIR was synchronized - I don't see why apart from that the standard javassist.ClassPool implementation was synchronized?
    public final CtClass get0(String classname, boolean useCache) throws NotFoundException
    {
-      //KABIR Made final just to make sure that cached lookups are only handled in one place. 
-      CtClass cachedLookup = cachedLookups.get(classname, domain.getModCount());
-      if (cachedLookup != null)
+      //KABIR Made final just to make sure that cached lookups are only handled in one place.
+      
+      if (cachedLookups != null)
       {
-         logger.trace(classname + " was found in the cache of " + this);
-         return cachedLookup;
+         CtClass cachedLookup = cachedLookups.get(classname, domain.getModCount());
+         if (cachedLookup != null)
+         {
+            logger.trace(classname + " was found in the cache of " + this);
+            return cachedLookup;
+         }
       }
-
+      
       if (isGeneratedClass(classname))
       {
          return null;
@@ -117,7 +121,8 @@
          clazz = loadLocally(classname, ClassLoaderUtils.getResourceName(classname), true);
       }
       
-      cachedLookups.put(classname, clazz);
+      if (cachedLookups != null)
+         cachedLookups.put(classname, clazz);
       return clazz;
    }
    

Added: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentFirstDelegatingClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentFirstDelegatingClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentFirstDelegatingClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.classpool.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedParentFirstDelegatingClassPoolTestCase extends ParentFirstDelegatingClassPoolTestCase
+{
+   public CachedParentFirstDelegatingClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentLastDelegatingClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentLastDelegatingClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedParentLastDelegatingClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.classpool.test;
+
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedParentLastDelegatingClassPoolTestCase extends ParentLastDelegatingClassPoolTestCase
+{
+   public CachedParentLastDelegatingClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedScopedSiblingDelegatingClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedScopedSiblingDelegatingClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedScopedSiblingDelegatingClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.classpool.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedScopedSiblingDelegatingClassPoolTestCase extends ScopedSiblingDelegatingClassPoolTestCase
+{
+   public CachedScopedSiblingDelegatingClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedSimpleDelegatingClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedSimpleDelegatingClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/CachedSimpleDelegatingClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.classpool.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedSimpleDelegatingClassPoolTestCase extends SimpleDelegatingClassPoolTestCase
+{
+   public CachedSimpleDelegatingClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Modified: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/RealCtCacheTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/RealCtCacheTestCase.java	2010-01-12 15:40:59 UTC (rev 99290)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/RealCtCacheTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -150,7 +150,7 @@
    {
       MockCachePolicy.policies.clear();
       ClassPoolDomain parent = createClassPoolDomain("PARENT", null, true);
-      ClassPool parentA = createDelegatingClassPool(parent, JAR_A_URL);
+      createDelegatingClassPool(parent, JAR_A_URL);
 
       assertEquals(1, MockCachePolicy.policies.size());
       MockCachePolicy.policies.clear();

Modified: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleCtCacheTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleCtCacheTestCase.java	2010-01-12 15:40:59 UTC (rev 99290)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleCtCacheTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -41,16 +41,6 @@
  */
 public class SimpleCtCacheTestCase extends TestCase
 {
-   public void testDomainCacheFactoryDefaultCacheNoProperties()
-   {
-      CtClassCacheFactory factory = CtClassCacheFactory.createFromProperties();
-      assertEquals(TimedCachePolicy.class, factory.getPolicyClass());
-      assertEquals(CtClassCacheFactory.DEFAULT_TIMED_POLICY_LIFETIME, factory.getLifetime());
-      assertEquals(CtClassCacheFactory.DEFAULT_TIMED_POLICY_RESOLUTION, factory.getResolution());
-      assertEquals(0, factory.getMin());
-      assertEquals(0, factory.getMax());
-   }
-   
    public void testDomainCacheFactoryTimedCacheNoProperties()
    {
       Properties properties = new Properties();
@@ -116,6 +106,7 @@
    public void testTimedDomainCache() throws Exception
    {
       Properties properties = new Properties();
+      properties.put(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
       setProperty(properties, CtClassCacheFactory.TIMED_POLICY_LIFETIME, 1);
       setProperty(properties, CtClassCacheFactory.TIMED_POLICY_RESOLUTION, 1);
       
@@ -141,6 +132,7 @@
    public void testCacheInvalidation() throws Exception
    {
       Properties properties = new Properties();
+      properties.put(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
       setProperty(properties, CtClassCacheFactory.TIMED_POLICY_LIFETIME, 100);
       setProperty(properties, CtClassCacheFactory.TIMED_POLICY_RESOLUTION, 10);
       

Modified: projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleDelegatingClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleDelegatingClassPoolTestCase.java	2010-01-12 15:40:59 UTC (rev 99290)
+++ projects/jboss-classpool/trunk/classpool/src/test/java/org/jboss/test/classpool/test/SimpleDelegatingClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -160,7 +160,7 @@
       
       try
       {
-         ClassPoolDomain domain = createClassPoolDomain("SIMPLE", null, false);
+         createClassPoolDomain("SIMPLE", null, false);
    
          List<ClassPoolRepositoryCallback> callbacks = repository.getClassPoolRepositoryCallbacks();
          assertNotNull(callbacks);

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedArchiveClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedArchiveClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedArchiveClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedArchiveClassPoolTestCase extends ArchiveClassPoolTestCase
+{
+   public CachedArchiveClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedCtClassCreationTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedCtClassCreationTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedCtClassCreationTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedCtClassCreationTestCase extends CtClassCreationTestCase
+{
+   public CachedCtClassCreationTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalDomainClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalDomainClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalDomainClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedHierarchicalDomainClassPoolTestCase extends HierarchicalDomainClassPoolTestCase
+{
+   public CachedHierarchicalDomainClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalParentLoaderClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalParentLoaderClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedHierarchicalParentLoaderClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedHierarchicalParentLoaderClassPoolTestCase extends
+   HierarchicalParentLoaderClassPoolTestCase
+{
+   public CachedHierarchicalParentLoaderClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedModuleDependencyClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedModuleDependencyClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedModuleDependencyClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedModuleDependencyClassPoolTestCase extends ModuleDependencyClassPoolTestCase
+{
+   public CachedModuleDependencyClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedPackageDependencyClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedPackageDependencyClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedPackageDependencyClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedPackageDependencyClassPoolTestCase extends PackageDependencyClassPoolTestCase
+{
+   public CachedPackageDependencyClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportModuleClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportModuleClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportModuleClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedReExportModuleClassPoolTestCase extends
+      ReExportModuleClassPoolTestCase
+{
+   public CachedReExportModuleClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportPackageClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportPackageClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReExportPackageClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedReExportPackageClassPoolTestCase extends ReExportPackageClassPoolTestCase
+{
+   public CachedReExportPackageClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReplaceReferencesClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReplaceReferencesClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedReplaceReferencesClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, 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.classpool.jbosscl.test;
+
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedReplaceReferencesClassPoolTestCase extends ReplaceReferencesClassPoolTestCase
+{
+   public CachedReplaceReferencesClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   public void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedRepositoryClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedRepositoryClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedRepositoryClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedRepositoryClassPoolTestCase extends RepositoryClassPoolTestCase
+{
+   public CachedRepositoryClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   public void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedUsesPackageClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedUsesPackageClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/jbosscl/src/test/java/org/jboss/test/classpool/jbosscl/test/CachedUsesPackageClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.jbosscl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedUsesPackageClassPoolTestCase extends UsesPackageClassPoolTestCase
+{
+   public CachedUsesPackageClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+   
+   @Override
+   public void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedCtClassCreationTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedCtClassCreationTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedCtClassCreationTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.ucl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedCtClassCreationTestCase extends CtClassCreationTestCase
+{
+   public CachedCtClassCreationTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file

Added: projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedRepositoryClassPoolTestCase.java
===================================================================
--- projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedRepositoryClassPoolTestCase.java	                        (rev 0)
+++ projects/jboss-classpool/trunk/ucl/src/test/java/org/jboss/test/classpool/ucl/test/CachedRepositoryClassPoolTestCase.java	2010-01-12 15:42:49 UTC (rev 99291)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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.test.classpool.ucl.test;
+
+import org.jboss.classpool.base.CtClassCacheFactory;
+import org.jboss.util.TimedCachePolicy;
+
+/**
+ * Needs to be run in a fresh JVM to set up caching
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 99199 $
+ */
+public class CachedRepositoryClassPoolTestCase extends RepositoryClassPoolTestCase
+{
+   public CachedRepositoryClassPoolTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      System.setProperty(CtClassCacheFactory.POLICY_CLASS, TimedCachePolicy.class.getName());
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list