[jboss-cvs] JBossAS SVN: r88185 - branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 5 00:20:26 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-05-05 00:20:26 -0400 (Tue, 05 May 2009)
New Revision: 88185
Added:
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java
Removed:
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java
Modified:
branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java
Log:
[JBAS-6864] Split up the tests into one test per class
Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java 2009-05-05 04:19:45 UTC (rev 88184)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakTestBase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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
*/
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java 2009-05-05 04:19:45 UTC (rev 88184)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java 2009-05-05 04:19:45 UTC (rev 88184)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/EarWithDualCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Copied: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java (from rev 88166, branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java)
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakTestBase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java 2009-05-05 04:19:45 UTC (rev 88184)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/Ejb3ClassloaderLeakUnitTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Copied: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java (from rev 88166, branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/CommonsLoggingClassloaderLeakUnitTestCase.java)
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEarWithDualCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/IsolatedNoWebEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Copied: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java (from rev 88166, branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/ClassloaderLeakUnitTestCase.java)
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/J2EEClassloaderLeakTestBase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/NoWebEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb2ClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3ClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleEjb3EarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/SimpleWarClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java 2009-05-05 04:20:26 UTC (rev 88185)
@@ -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: branches/Branch_5_x/testsuite/src/main/org/jboss/test/classloader/leak/test/WarWithCommonsLoggingClassloaderLeakTestCase.java
___________________________________________________________________
Name: svn:keywords
+
More information about the jboss-cvs-commits
mailing list