[jboss-cvs] JBossAS SVN: r88222 - in trunk/testsuite: src/main/org/jboss/test/classloader/leak/clstore and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 5 11:06:31 EDT 2009


Author: bstansberry at jboss.com
Date: 2009-05-05 11:06:30 -0400 (Tue, 05 May 2009)
New Revision: 88222

Added:
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java
Removed:
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java
Modified:
   trunk/testsuite/imports/server-config.xml
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTracker.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTrackerMBean.java
   trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java
Log:
[JBAS-6864] Port refactor from Branch_5_x

Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/imports/server-config.xml	2009-05-05 15:06:30 UTC (rev 88222)
@@ -706,7 +706,7 @@
       <server name="classloader-leak" host="${node0}">
       	<jvmarg value="-Xms128m" />
       	<jvmarg value="-Xmx512m" />
-      	<jvmarg value="-XX:MaxPermSize=512m" />
+      	<jvmarg value="-XX:MaxPermSize=256m" />
       	<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
          <!-- Uncomment to use JBoss Profiler to analyze heap. The
               -d64 argument may not be needed and definitely shouldn't
@@ -721,7 +721,7 @@
       <server name="cluster-classloader-leak-0" host="${node0}">
          <jvmarg value="-Xms128m" />
          <jvmarg value="-Xmx512m" />
-         <jvmarg value="-XX:MaxPermSize=512m" />        
+         <jvmarg value="-XX:MaxPermSize=256m" />        
          <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
          <!-- Uncomment to use JBoss Profiler to analyze heap. The
               -d64 argument may not be needed and definitely shouldn't
@@ -741,7 +741,7 @@
       <server name="cluster-classloader-leak-1" host="${node1}">
          <jvmarg value="-Xms128m" />
          <jvmarg value="-Xmx512m" />
-         <jvmarg value="-XX:MaxPermSize=512m" />        
+         <jvmarg value="-XX:MaxPermSize=256m" />        
          <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
          <sysproperty key="java.net.preferIPv4Stack" value="true" />
          <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />

Modified: trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderStore.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -31,9 +31,11 @@
 import java.io.Serializable;
 import java.lang.ref.WeakReference;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.jboss.logging.Logger;
+import org.jboss.profiler.jvmti.ReferenceDataPoint;
 
 public class ClassLoaderStore
 {
@@ -41,7 +43,7 @@
    
    private static ClassLoaderStore instance = new ClassLoaderStore();
    
-   private final Map classloaders = new HashMap();
+   private final Map<String, WeakReference<ClassLoader>> classloaders = new HashMap<String, WeakReference<ClassLoader>>();
 
    private final int depth = Integer.parseInt(System.getProperty("jboss.classloader.leak.test.depth", "12"));
 
@@ -64,14 +66,14 @@
          log.debug("Parent is " + parent);
          parent = parent.getParent();
       }
-      WeakReference ref = new WeakReference(loader);
+      WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(loader);
       classloaders.put(key, ref);
    }
    
    public ClassLoader getClassLoader(String key, boolean forceGC, String reportFile)
    {
       ClassLoader result = null;
-      WeakReference ref = (WeakReference) classloaders.get(key);
+      WeakReference<ClassLoader> ref = classloaders.get(key);
       if (ref != null)
       {
          result = (ClassLoader) ref.get();
@@ -101,7 +103,7 @@
     * @param reportHTMLFile the report file 
     * @throws Exception
     */
-   private ClassLoader getClassLoader(WeakReference weakReferenceOnLoader, String reportHTMLFile) throws Exception
+   private ClassLoader getClassLoader(WeakReference<ClassLoader> weakReferenceOnLoader, String reportHTMLFile) throws Exception
    {
       LeakAnalyzer leakAnalyzer = null;
       try
@@ -143,7 +145,8 @@
          
          Thread.sleep(20);
             
-         HashMap datapoints = leakAnalyzer.createIndexMatrix();
+         @SuppressWarnings("unchecked")
+         HashMap<Long, List<ReferenceDataPoint>> datapoints = leakAnalyzer.createIndexMatrix();
          
          if (weakReferenceOnLoader.get() == null)
          {
@@ -184,7 +187,7 @@
       return (ClassLoader) weakReferenceOnLoader.get();
    }
    
-   private void fillMemory(WeakReference ref)
+   private void fillMemory(WeakReference<ClassLoader> ref)
    {
       Runtime rt = Runtime.getRuntime();
       int[] adds = { 0, 10, 20, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 };
@@ -199,24 +202,31 @@
           
           // create garbage, filling a larger and larger % of
           // free memory on each loop
+          byte[][] bytez =  new byte[10000][];
           long avail = rt.freeMemory();
           int create = (int) (avail / 1000 * (950 + toAdd));
           String pct = (95 + (toAdd/10)) + "." + (toAdd - ((toAdd/10) * 10));
-          int bucket = create / 1000;
+          int bucket = create / 10000;
           log.info("Filling " + pct + "% of free memory. Free memory=" + avail + 
                    " Total Memory=" + rt.totalMemory() + " Max Memory=" + rt.maxMemory());
           
           try
           {
-             byte[][] bytez =  new byte[1000][];
              for (int j = 0; j < bytez.length; j++)
+             {
                 bytez[j] = new byte[bucket];
+                if (j % 100 == 0 && ref.get() == null)
+                {
+                   return;
+                }
+             }
           }
           catch (Throwable t)
           {
-             log.warn("Caught throwable filling memory: " + t);
+             bytez = null;
              System.gc();
              System.runFinalization();
+             log.warn("Caught throwable filling memory: " + t);
              break;
           }       
           finally

Modified: trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTracker.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTracker.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTracker.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -21,6 +21,9 @@
  */
 package org.jboss.test.classloader.leak.clstore;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.jboss.logging.Logger;
 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
 
@@ -31,6 +34,18 @@
    private ClassLoaderStore store = ClassLoaderStore.getInstance();
    private JaasSecurityManagerServiceMBean securityManagerService;
    
+   public List<String> hasClassLoaders(String[] keys)
+   {
+      System.gc();
+      List<String> list = new ArrayList<String>();
+      for (String key : keys)
+      {
+         if (store.getClassLoader(key, false, null) != null)
+            list.add(key);
+      }
+      return list;
+   }
+   
    public boolean hasClassLoader(String key)
    {
       System.gc();

Modified: trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTrackerMBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTrackerMBean.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/clstore/ClassLoaderTrackerMBean.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -21,6 +21,8 @@
  */
 package org.jboss.test.classloader.leak.clstore;
 
+import java.util.List;
+
 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
 
 
@@ -28,6 +30,8 @@
 {
    public static final String OBJECT_NAME = "jboss.test:service=ClassLoaderTracker";
    
+   public List<String> hasClassLoaders(String[] keys);
+   
    public boolean hasClassLoader(String key);
    
    public boolean hasClassLoaderBeenReleased(String key);

Modified: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -28,6 +28,7 @@
 import java.net.HttpURLConnection;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 import javax.management.MBeanServerConnection;
@@ -41,6 +42,11 @@
 /**
  * Abstract superclass of the EJB2 and EJB3 versions of the classloader leak
  * tests.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
  * 
  * @author Brian Stansberry
  */
@@ -98,7 +104,7 @@
    
    protected void cleanDeployments() throws Exception
    {
-      Iterator it = deployments.iterator();
+      Iterator<String> it = deployments.iterator();
       while (it.hasNext())
       {
          undeployComponent((String) it.next(), false);
@@ -239,18 +245,20 @@
    
    protected void checkCleanKeys(String[] keys) throws Exception
    {
+      List<String> registered = hasClassLoaders(keys);
       for (int i = 0; i < keys.length; i++)
       {
-         if (hasClassLoader(keys[i]))
+         if (registered.contains(keys[i]))
             throw new IllegalStateException("Classloader already registered for " + keys[i]);
       }
    }
    
    protected void checkKeyRegistration(String[] keys) throws Exception
    {
+      List<String> registered = hasClassLoaders(keys);
       for (int i = 0; i < keys.length; i++)
       {
-         assertTrue(keys[i] + " classloader registered", hasClassLoader(keys[i]));
+         assertTrue(keys[i] + " classloader registered", registered.contains(keys[i]));
       }
    }
    
@@ -269,15 +277,25 @@
       return faillist;
    }
    
-   private boolean hasClassLoader(String key) throws Exception
+   @SuppressWarnings("unchecked")
+   private List<String> hasClassLoaders(String[] keys) throws Exception
    {
       MBeanServerConnection adaptor = delegate.getServer();
       ObjectName on = new ObjectName(ClassLoaderTrackerMBean.OBJECT_NAME);
-      Object[] params = { key };
-      String[] signature = new String[] { String.class.getName() };
-      return ((Boolean) adaptor.invoke(on, "hasClassLoader", params, signature)).booleanValue();
+      Object[] params = { keys };
+      String[] signature = new String[] { String[].class.getName() };
+      return ((List) adaptor.invoke(on, "hasClassLoaders", params, signature));
    }
    
+//   private boolean hasClassLoader(String key) throws Exception
+//   {
+//      MBeanServerConnection adaptor = delegate.getServer();
+//      ObjectName on = new ObjectName(ClassLoaderTrackerMBean.OBJECT_NAME);
+//      Object[] params = { key };
+//      String[] signature = new String[] { String.class.getName() };
+//      return ((Boolean) adaptor.invoke(on, "hasClassLoader", params, signature)).booleanValue();
+//   }
+   
    private boolean hasClassLoaderBeenReleased(String key) throws Exception
    {
       MBeanServerConnection adaptor = delegate.getServer();

Deleted: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -1,123 +0,0 @@
-/*
- * 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.classloader.leak.test;
-
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.test.classloader.leak.ejb.interfaces.StatefulSession;
-import org.jboss.test.classloader.leak.ejb.interfaces.StatefulSessionHome;
-import org.jboss.test.classloader.leak.ejb.interfaces.StatelessSession;
-import org.jboss.test.classloader.leak.ejb.interfaces.StatelessSessionHome;
-
-/**
- * Test for classloader leaks following deployment, use and undeployment
- * of various packages (wars, ejb jars and ears with and without scoped
- * classloaders).
- * <p/>
- * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
- * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
- * an extensive report will be logged to the server log, showing the path to root of
- * all references to the classloader.
- * 
- * @author Brian Stansberry
- */
-public class ClassloaderLeakUnitTestCase extends ClassloaderLeakTestBase
-{
-   private static final String SIMPLE_WAR = "classloader-leak-simple.war";
-   private static final String SIMPLE_EJB = "classloader-leak-ejb.jar"; 
-   private static final String SIMPLE_EAR = "classloader-leak-simple.ear"; 
-   private static final String SIMPLE_ISOLATED_EAR = "classloader-leak-simple-isolated.ear";
-   private static final String NO_WEB_EAR = "classloader-leak-noweb.ear";
-   private static final String ISOLATED_NO_WEB_EAR = "classloader-leak-noweb-isolated.ear";
-   
-   private static final String EJB2_SLSB = "EJB2_SLSB";
-   private static final String EJB2_SFSB = "EJB2_SFSB";
-   private static final String EJB2_SLSB_TCCL = "EJB2_SLSB_TCCL";
-   private static final String EJB2_SFSB_TCCL = "EJB2_SFSB_TCCL";
-   
-   private static final String[] EJB2 = new String[]{ EJB2_SLSB, EJB2_SLSB_TCCL, EJB2_SFSB, EJB2_SFSB_TCCL };
-   
-   
-   public ClassloaderLeakUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(ClassloaderLeakUnitTestCase.class, "classloader-leak-test.sar");
-   }
-   
-   public void testSimpleWar() throws Exception
-   {
-      warTest(SIMPLE_WAR);
-   }
-   
-   public void testSimpleEjb() throws Exception
-   {
-      ejbTest(SIMPLE_EJB);
-   }
-   
-   public void testSimpleEar() throws Exception
-   {
-      earTest(SIMPLE_EAR);
-   }
-   
-   public void testNoWebEar() throws Exception
-   {
-      ejbTest(NO_WEB_EAR);
-   }
-   
-   public void testSimpleIsolatedEar() throws Exception
-   {
-      earTest(SIMPLE_ISOLATED_EAR);
-   }
-   
-   public void testIsolatedNoWebEar() throws Exception
-   {
-      ejbTest(ISOLATED_NO_WEB_EAR);
-   }
-   
-   protected String getWarContextPath()
-   {
-      return "classloader-leak";
-   }
-   
-   protected String[] getEjbKeys()
-   {
-      return EJB2;
-   }
-   
-   protected void makeEjbRequests() throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      StatelessSessionHome slsbhome = (StatelessSessionHome) ctx.lookup("ClassloaderLeakStatelessSession");
-      StatelessSession slsbbean = slsbhome.create();
-      slsbbean.log("EJB");
-      StatefulSessionHome sfsbhome = (StatefulSessionHome) ctx.lookup("ClassloaderLeakStatefulSession");
-      StatefulSession sfsbbean = sfsbhome.create();
-      sfsbbean.log("EJB");
-   }
-}

Deleted: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -1,120 +0,0 @@
-/*
- * 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.classloader.leak.test;
-
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.test.classloader.leak.ejb.interfaces.StatefulSession;
-import org.jboss.test.classloader.leak.ejb.interfaces.StatefulSessionHome;
-import org.jboss.test.classloader.leak.ejb.interfaces.StatelessSession;
-import org.jboss.test.classloader.leak.ejb.interfaces.StatelessSessionHome;
-
-/**
- * Tests for classloader leaks caused by use of Jakarta Commons Logging. 
- * Checks for classloader leaks following deployment, use and undeployment
- * of various packages (wars, ejb jars and ears with and without scoped
- * classloaders). There are various permutations of the tests
- * that store copies of commons-logging in different locations on the classpath.
- * <p>
- * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
- * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
- * an extensive report will be logged to the server log, showing the path to root of
- * all references to the classloader.
- * <p/>
- * 
- * @author Brian Stansberry
- */
-public class CommonsLoggingClassloaderLeakUnitTestCase extends ClassloaderLeakTestBase
-{
-   private static final String WAR_WITH_JCL = "classloader-leak-in-war.war";
-   private static final String EAR_WITH_JCL = "classloader-leak-in-ear.ear";
-   private static final String ISOLATED_EAR_WITH_JCL = "classloader-leak-in-ear-isolated.ear";
-   private static final String EAR_WITH_DUAL_JCL = "classloader-leak-dual.ear";
-   private static final String ISOLATED_EAR_WITH_DUAL_JCL = "classloader-leak-dual-isolated.ear";
-   
-   private static final String EJB2_SLSB = "EJB2_SLSB";
-   private static final String EJB2_SFSB = "EJB2_SFSB";
-   private static final String EJB2_SLSB_TCCL = "EJB2_SLSB_TCCL";
-   private static final String EJB2_SFSB_TCCL = "EJB2_SFSB_TCCL";
-   
-   private static final String[] EJB2 = new String[]{ EJB2_SLSB, EJB2_SLSB_TCCL, EJB2_SFSB, EJB2_SFSB_TCCL };
-   
-   
-   public CommonsLoggingClassloaderLeakUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(CommonsLoggingClassloaderLeakUnitTestCase.class, "classloader-leak-test.sar");
-   }
-   
-   public void testWarWithJcl() throws Exception
-   {
-      warTest(WAR_WITH_JCL);
-   }
-   
-   public void testEarWithJcl() throws Exception
-   {
-      earTest(EAR_WITH_JCL);
-   }
-   
-   public void testIsolatedEarWithJcl() throws Exception
-   {
-      earTest(ISOLATED_EAR_WITH_JCL);
-   }
-   
-   public void testEarWithDualJcl() throws Exception
-   {
-      earTest(EAR_WITH_DUAL_JCL);
-   }
-   
-   public void testIsolatedEarWithDualJcl() throws Exception
-   {
-      earTest(ISOLATED_EAR_WITH_DUAL_JCL);
-   }
-   
-   protected String getWarContextPath()
-   {
-      return "classloader-leak";
-   }
-   
-   protected String[] getEjbKeys()
-   {
-      return EJB2;
-   }
-   
-   protected void makeEjbRequests() throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      StatelessSessionHome slsbhome = (StatelessSessionHome) ctx.lookup("ClassloaderLeakStatelessSession");
-      StatelessSession slsbbean = slsbhome.create();
-      slsbbean.log("EJB");
-      StatefulSessionHome sfsbhome = (StatefulSessionHome) ctx.lookup("ClassloaderLeakStatefulSession");
-      StatefulSession sfsbbean = sfsbhome.create();
-      sfsbbean.log("EJB");
-   }
-}

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,60 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+
+/**
+ * Tests for classloader leaks caused by use of Jakarta Commons Logging; here 
+ * checking for classloader leaks following deployment, use and undeployment
+ * of a basic ear.
+ * <p>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * <p/>
+ * 
+ * @author Brian Stansberry
+ */
+public class EarWithCommonsLoggingClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String EAR_WITH_JCL = "classloader-leak-in-ear.ear";
+   
+   
+   public EarWithCommonsLoggingClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(EarWithCommonsLoggingClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testEarWithJcl() throws Exception
+   {
+      earTest(EAR_WITH_JCL);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,58 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+
+/**
+ * Tests for classloader leaks caused by use of Jakarta Commons Logging; here 
+ * checking for classloader leaks following deployment, use and undeployment
+ * of an ear with a commons-logging.jar packed in both the war and the ejb jar.
+ * <p>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * <p/>
+ * 
+ * @author Brian Stansberry
+ */
+public class EarWithDualCommonsLoggingClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String EAR_WITH_DUAL_JCL = "classloader-leak-dual.ear";
+   
+   public EarWithDualCommonsLoggingClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(EarWithDualCommonsLoggingClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testEarWithDualJcl() throws Exception
+   {
+      earTest(EAR_WITH_DUAL_JCL);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,78 @@
+/*
+ * 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.classloader.leak.test;
+
+import javax.naming.InitialContext;
+
+import org.jboss.test.classloader.leak.ejb3.Ejb3StatefulSession;
+import org.jboss.test.classloader.leak.ejb3.Ejb3StatelessSession;
+
+/**
+ * Similar to {@link J2EEClassloaderLeakTestBase}, but uses EJB3 instead
+ * of EJB2.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class Ejb3ClassloaderLeakTestBase extends ClassloaderLeakTestBase
+{
+   
+   private static final String EJB3_SLSB = "EJB3_SLSB";
+   private static final String EJB3_SFSB = "EJB3_SFSB";
+   private static final String EJB3_SLSB_TCCL = "EJB3_SLSB_TCCL";
+   private static final String EJB3_SFSB_TCCL = "EJB3_SFSB_TCCL";
+   private static final String EJB3_TLP_SLSB = "EJB3_TLP_SLSB";
+   private static final String EJB3_TLP_SLSB_TCCL = "EJB3_TLP_SLSB_TCCL";
+   
+   private static final String[] EJB3 = new String[]{ EJB3_SLSB, EJB3_SLSB_TCCL, EJB3_SFSB, EJB3_SFSB_TCCL, EJB3_TLP_SLSB, EJB3_TLP_SLSB_TCCL  };
+   
+   
+   public Ejb3ClassloaderLeakTestBase(String name)
+   {
+      super(name);
+   }
+   
+   protected String getWarContextPath()
+   {
+      return "classloader-leak-ejb3";
+   }
+   
+   protected String[] getEjbKeys()
+   {
+      return EJB3;
+   }
+   
+   protected void makeEjbRequests() throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      Ejb3StatelessSession ejb3slsb = (Ejb3StatelessSession) ctx.lookup("Ejb3StatelessSession/remote");
+      ejb3slsb.log("EJB");
+      Ejb3StatefulSession ejb3sfsb = (Ejb3StatefulSession) ctx.lookup("Ejb3StatefulSession/remote");
+      ejb3sfsb.log("EJB");
+      Ejb3StatelessSession tlpejb3slsb = (Ejb3StatelessSession) ctx.lookup("ThreadLocalPoolEjb3StatelessSession/remote");
+      tlpejb3slsb.log("EJB");
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
___________________________________________________________________
Name: svn:keywords
   + 

Deleted: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java	2009-05-05 15:04:30 UTC (rev 88221)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -1,117 +0,0 @@
-/*
- * 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.classloader.leak.test;
-
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.test.classloader.leak.ejb3.Ejb3StatefulSession;
-import org.jboss.test.classloader.leak.ejb3.Ejb3StatelessSession;
-
-/**
- * Similar to {@link ClassloaderLeakUnitTestCase}, but uses EJB3 instead
- * of EJB2. Doesn't repeat the non-EJB related tests, nor does it go through
- * all the various permutations of Jakarta Commons Logging packaging.
- * <p/>
- * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
- * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
- * an extensive report will be logged to the server log, showing the path to root of
- * all references to the classloader.
- * 
- * @author Brian Stansberry
- */
-public class Ejb3ClassloaderLeakUnitTestCase extends ClassloaderLeakTestBase
-{
-   private static final String SIMPLE_EJB = "classloader-leak-ejb3.jar"; 
-   private static final String SIMPLE_EAR = "classloader-leak-simple-ejb3.ear"; 
-   private static final String SIMPLE_ISOLATED_EAR = "classloader-leak-simple-isolated-ejb3.ear";
-   private static final String NO_WEB_EAR = "classloader-leak-noweb-ejb3.ear";
-   private static final String ISOLATED_NO_WEB_EAR = "classloader-leak-noweb-isolated-ejb3.ear";
-   
-   private static final String EJB3_SLSB = "EJB3_SLSB";
-   private static final String EJB3_SFSB = "EJB3_SFSB";
-   private static final String EJB3_SLSB_TCCL = "EJB3_SLSB_TCCL";
-   private static final String EJB3_SFSB_TCCL = "EJB3_SFSB_TCCL";
-   private static final String EJB3_TLP_SLSB = "EJB3_TLP_SLSB";
-   private static final String EJB3_TLP_SLSB_TCCL = "EJB3_TLP_SLSB_TCCL";
-   
-   private static final String[] EJB3 = new String[]{ EJB3_SLSB, EJB3_SLSB_TCCL, EJB3_SFSB, EJB3_SFSB_TCCL, EJB3_TLP_SLSB, EJB3_TLP_SLSB_TCCL  };
-   
-   
-   public Ejb3ClassloaderLeakUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(Ejb3ClassloaderLeakUnitTestCase.class, "classloader-leak-test.sar");
-   }
-   
-   public void testSimpleEjb() throws Exception
-   {
-      ejbTest(SIMPLE_EJB);
-   }
-   
-   public void testSimpleEar() throws Exception
-   {
-      earTest(SIMPLE_EAR);
-   }
-   
-   public void testNoWebEar() throws Exception
-   {
-      ejbTest(NO_WEB_EAR);
-   }
-   
-   public void testSimpleIsolatedEar() throws Exception
-   {
-      earTest(SIMPLE_ISOLATED_EAR);
-   }
-   
-   public void testIsolatedNoWebEar() throws Exception
-   {
-      ejbTest(ISOLATED_NO_WEB_EAR);
-   }
-   
-   protected String getWarContextPath()
-   {
-      return "classloader-leak-ejb3";
-   }
-   
-   protected String[] getEjbKeys()
-   {
-      return EJB3;
-   }
-   
-   protected void makeEjbRequests() throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      Ejb3StatelessSession ejb3slsb = (Ejb3StatelessSession) ctx.lookup("Ejb3StatelessSession/remote");
-      ejb3slsb.log("EJB");
-      Ejb3StatefulSession ejb3sfsb = (Ejb3StatefulSession) ctx.lookup("Ejb3StatefulSession/remote");
-      ejb3sfsb.log("EJB");
-      Ejb3StatelessSession tlpejb3slsb = (Ejb3StatelessSession) ctx.lookup("ThreadLocalPoolEjb3StatelessSession/remote");
-      tlpejb3slsb.log("EJB");
-   }
-}

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of an ear that only contains a single EJB2 jar but that uses
+ * a loader-repository.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class IsolatedEarClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String SIMPLE_ISOLATED_EAR = "classloader-leak-simple-isolated.ear";
+      
+   public IsolatedEarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(IsolatedEarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleIsolatedEar() throws Exception
+   {
+      earTest(SIMPLE_ISOLATED_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,59 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+
+/**
+ * Tests for classloader leaks caused by use of Jakarta Commons Logging; here 
+ * checking for classloader leaks following deployment, use and undeployment
+ * of an ear with a loader-repository configured.
+ * <p>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * <p/>
+ * 
+ * @author Brian Stansberry
+ */
+public class IsolatedEarWithCommonsLoggingClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String ISOLATED_EAR_WITH_JCL = "classloader-leak-in-ear-isolated.ear";
+      
+   public IsolatedEarWithCommonsLoggingClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testIsolatedEarWithJcl() throws Exception
+   {
+      earTest(ISOLATED_EAR_WITH_JCL);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+
+/**
+ * Same as {@link EarWithDualCommonsLoggingClassloaderLeakTestCase} but here the
+ * ear has a loader-repository configured.
+ * <p>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * <p/>
+ * 
+ * @author Brian Stansberry
+ */
+public class IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String ISOLATED_EAR_WITH_DUAL_JCL = "classloader-leak-dual-isolated.ear";
+   
+   public IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testIsolatedEarWithDualJcl() throws Exception
+   {
+      earTest(ISOLATED_EAR_WITH_DUAL_JCL);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,56 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of a simple EJB3 jar packaged in an ear with a loader-repository configured.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class IsolatedEjb3EarClassloaderLeakTestCase extends Ejb3ClassloaderLeakTestBase
+{
+   private static final String SIMPLE_ISOLATED_EAR = "classloader-leak-simple-isolated-ejb3.ear";
+   
+   public IsolatedEjb3EarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(IsolatedEjb3EarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleIsolatedEar() throws Exception
+   {
+      earTest(SIMPLE_ISOLATED_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of an ear that only contains a single EJB2 jar but that uses
+ * a loader-repository.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class IsolatedNoWebEarClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String ISOLATED_NO_WEB_EAR = "classloader-leak-noweb-isolated.ear";
+      
+   public IsolatedNoWebEarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(IsolatedNoWebEarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testIsolatedNoWebEar() throws Exception
+   {
+      ejbTest(ISOLATED_NO_WEB_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of an ear that only contains a single EJB2 jar but that uses
+ * a loader-repository.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class IsolatedNoWebEjb3EarClassloaderLeakTestCase extends Ejb3ClassloaderLeakTestBase
+{
+   private static final String ISOLATED_NO_WEB_EAR = "classloader-leak-noweb-isolated-ejb3.ear";
+   
+   public IsolatedNoWebEjb3EarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(IsolatedNoWebEjb3EarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testIsolatedNoWebEar() throws Exception
+   {
+      ejbTest(ISOLATED_NO_WEB_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,73 @@
+/*
+ * 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.classloader.leak.test;
+
+import javax.naming.InitialContext;
+
+import org.jboss.test.classloader.leak.ejb.interfaces.StatefulSession;
+import org.jboss.test.classloader.leak.ejb.interfaces.StatefulSessionHome;
+import org.jboss.test.classloader.leak.ejb.interfaces.StatelessSession;
+import org.jboss.test.classloader.leak.ejb.interfaces.StatelessSessionHome;
+
+/**
+ * Base class fpr tests for classloader leaks following deployment, use and 
+ * undeployment of various J2EE packages (wars, ejb jars and ears with and 
+ * without scoped classloaders).
+ * 
+ * @author Brian Stansberry
+ */
+public abstract class J2EEClassloaderLeakTestBase extends ClassloaderLeakTestBase
+{
+   private static final String EJB2_SLSB = "EJB2_SLSB";
+   private static final String EJB2_SFSB = "EJB2_SFSB";
+   private static final String EJB2_SLSB_TCCL = "EJB2_SLSB_TCCL";
+   private static final String EJB2_SFSB_TCCL = "EJB2_SFSB_TCCL";
+   
+   private static final String[] EJB2 = new String[]{ EJB2_SLSB, EJB2_SLSB_TCCL, EJB2_SFSB, EJB2_SFSB_TCCL };
+   
+   
+   protected J2EEClassloaderLeakTestBase(String name)
+   {
+      super(name);
+   }
+   
+   protected String getWarContextPath()
+   {
+      return "classloader-leak";
+   }
+   
+   protected String[] getEjbKeys()
+   {
+      return EJB2;
+   }
+   
+   protected void makeEjbRequests() throws Exception
+   {
+      InitialContext ctx = new InitialContext();
+      StatelessSessionHome slsbhome = (StatelessSessionHome) ctx.lookup("ClassloaderLeakStatelessSession");
+      StatelessSession slsbbean = slsbhome.create();
+      slsbbean.log("EJB");
+      StatefulSessionHome sfsbhome = (StatefulSessionHome) ctx.lookup("ClassloaderLeakStatefulSession");
+      StatefulSession sfsbbean = sfsbhome.create();
+      sfsbbean.log("EJB");
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of an ear that only contains a single EJB2 jar but that uses
+ * a loader-repository.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class NoWebEarClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String NO_WEB_EAR = "classloader-leak-noweb.ear";
+   
+   public NoWebEarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(NoWebEarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testNoWebEar() throws Exception
+   {
+      ejbTest(NO_WEB_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of an ear that only contains a single EJB3 jar but that uses
+ * a loader-repository.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class NoWebEjb3EarClassloaderLeakTestCase extends Ejb3ClassloaderLeakTestBase
+{
+   private static final String NO_WEB_EAR = "classloader-leak-noweb-ejb3.ear";
+   
+   public NoWebEjb3EarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(NoWebEjb3EarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testNoWebEar() throws Exception
+   {
+      ejbTest(NO_WEB_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,56 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of an ear that only contains a war and a single EJB2 jar.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class SimpleEarClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String SIMPLE_EAR = "classloader-leak-simple.ear"; 
+      
+   public SimpleEarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(SimpleEarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleEar() throws Exception
+   {
+      earTest(SIMPLE_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,57 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of a simple EJB2 jar.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class SimpleEjb2ClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String SIMPLE_EJB = "classloader-leak-ejb.jar";
+   
+   
+   public SimpleEjb2ClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(SimpleEjb2ClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleEjb() throws Exception
+   {
+      ejbTest(SIMPLE_EJB);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,56 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of a simple EJB3 jar.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class SimpleEjb3ClassloaderLeakTestCase extends Ejb3ClassloaderLeakTestBase
+{
+   private static final String SIMPLE_EJB = "classloader-leak-ejb3.jar";   
+   
+   public SimpleEjb3ClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(SimpleEjb3ClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleEjb() throws Exception
+   {
+      ejbTest(SIMPLE_EJB);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,56 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of a simple EJB3 jar packaged in an ear.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class SimpleEjb3EarClassloaderLeakTestCase extends Ejb3ClassloaderLeakTestBase
+{
+   private static final String SIMPLE_EAR = "classloader-leak-simple-ejb3.ear"; 
+   
+   public SimpleEjb3EarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(SimpleEjb3EarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleEar() throws Exception
+   {
+      earTest(SIMPLE_EAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,56 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Test for classloader leaks following deployment, use and undeployment
+ * of a simple war.
+ * <p/>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * 
+ * @author Brian Stansberry
+ */
+public class SimpleWarClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String SIMPLE_WAR = "classloader-leak-simple.war";
+   
+   
+   public SimpleWarClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(SimpleWarClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testSimpleWar() throws Exception
+   {
+      warTest(SIMPLE_WAR);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 

Added: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java	2009-05-05 15:06:30 UTC (rev 88222)
@@ -0,0 +1,59 @@
+/*
+ * 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.classloader.leak.test;
+
+import junit.framework.Test;
+
+/**
+ * Tests for classloader leaks caused by use of Jakarta Commons Logging; here 
+ * checking for classloader leaks following deployment, use and undeployment
+ * of a simple war.
+ * <p>
+ * If these tests are run with JBoss Profiler's jbossAgent (.dll or .so) on the path
+ * and the AS is started with -agentlib:jbossAgent, in case of classloader leakage
+ * an extensive report will be logged to the server log, showing the path to root of
+ * all references to the classloader.
+ * <p/>
+ * 
+ * @author Brian Stansberry
+ */
+public class WarWithCommonsLoggingClassloaderLeakTestCase extends J2EEClassloaderLeakTestBase
+{
+   private static final String WAR_WITH_JCL = "classloader-leak-in-war.war";
+   
+   
+   public WarWithCommonsLoggingClassloaderLeakTestCase(String name)
+   {
+      super(name);
+   }
+
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(WarWithCommonsLoggingClassloaderLeakTestCase.class, "classloader-leak-test.sar");
+   }
+   
+   public void testWarWithJcl() throws Exception
+   {
+      warTest(WAR_WITH_JCL);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
   + 




More information about the jboss-cvs-commits mailing list