[jboss-cvs] JBossAS SVN: r111502 - in branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525: testsuite and 15 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 1 15:40:38 EDT 2011


Author: jiwils
Date: 2011-06-01 15:40:37 -0400 (Wed, 01 Jun 2011)
New Revision: 111502

Added:
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/tests-jbpapp6523.xml
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/sections/commons_logging.xml
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/CommonsLoggingBaseTestCase.java
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLFalseTestCase.java
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLTrueTestCase.java
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/war/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/war/DummyLog.java
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/classes/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/classes/commons-logging.properties
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/lib/
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/lib/old-commons-logging.jar
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/web.xml
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/index.jsp
Modified:
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/build/build.properties
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/build.xml
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/configs.xml
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/server-config.xml
   branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/test-jars.xml
Log:
Tests for JBPAPP-6525.

Modified: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/build/build.properties
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/build/build.properties	2011-06-01 16:25:32 UTC (rev 111501)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/build/build.properties	2011-06-01 19:40:37 UTC (rev 111502)
@@ -10,4 +10,4 @@
 build.soa=true
 
 # set this to true if you want to run testcases
-build.unsecure=false
+build.unsecure=true

Modified: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/build.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/build.xml	2011-06-01 16:25:32 UTC (rev 111501)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/build.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -893,6 +893,10 @@
     <antcall target="tests-classloader-leak"/>
     <antcall target="tests-jbmcluster"/>
     <antcall target="tests-jbmNonCluster"/>
+    
+    <!-- Commons logging TCCL fix - JBPAPP-6523 -->
+    <antcall target="tests-jbpapp6523"/>
+    
     <antcall target="tests-report"/>
     <record name="${basedir}/build.log" action="stop"/>
   </target>

Modified: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/configs.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/configs.xml	2011-06-01 16:25:32 UTC (rev 111501)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/configs.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -11,5 +11,5 @@
     JBoss Server Configuration -->
 <import file="tests-jacc.xml"/>
 <import file="tests-crash-recovery.xml"/>
-
+<import file="tests-jbpapp6523.xml"/>
 </project>

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/tests-jbpapp6523.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/tests-jbpapp6523.xml	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/config/tests-jbpapp6523.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+
+<!--
+   | Targets that run the jbpapp6523 - Commons Logging Use TCCL tests
+-->
+<project name="jbpapp6523.tests" xmlns:server="http://jboss.org/ns/test/ant/server">
+
+   <patternset id="jbpapp6523-use_tccl-false.includes">
+      <include name="org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLFalseTestCase.class"/>
+   </patternset>
+   <patternset id="jbpapp6523-use_tccl-true.includes">
+      <include name="org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLTrueTestCase.class"/>
+   </patternset>
+   
+   <target name="test-jbpapp6523" description="Tests JBPAPP-6523 Commons Loggins Use TCCL">
+     
+     <!-- use_tccl = false -->
+      <create-config baseconf="all" newconf="jbpapp6523-use_tccl-false">
+         <patternset>
+            <include name="**/*"/>
+         </patternset>
+      </create-config>
+
+      <server:start name="jbpapp6523-use_tccl-false"/>
+      <run-junit junit.patternset="jbpapp6523-use_tccl-false.includes"
+                 junit.configuration="use_tccl=false"/>
+      <server:stop name="jbpapp6523-use_tccl-false"/>
+      
+      <!-- use_tccl = true -->
+      <create-config baseconf="all" newconf="jbpapp6523-use_tccl-true">
+         <patternset>
+            <include name="**/*"/>
+         </patternset>
+      </create-config>
+
+      <server:start name="jbpapp6523-use_tccl-true"/>
+      <run-junit junit.patternset="jbpapp6523-use_tccl-true.includes"
+                 junit.configuration="use_tccl=true"/>
+      <server:stop name="jbpapp6523-use_tccl-true"/>
+
+   </target>
+</project>
\ No newline at end of file

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/sections/commons_logging.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/sections/commons_logging.xml	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/sections/commons_logging.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,27 @@
+<project name="tests-commons_logging-jars">
+   <property name="jbpapp6523" value="org/jboss/test/commons_logging/jbpapp6523"/>
+
+   <target name="_jars-commons_logging">
+      <mkdir dir="${build.lib}"/>
+      
+      <!-- dummy-logger.jar -->
+      <jar destfile="${build.lib}/dummy-log.jar">
+         <fileset dir="${build.classes}">
+	    <include name="${jbpapp6523}/war/DummyLog.class"/>
+         </fileset>
+      </jar>
+      
+      <!-- jbpapp6523.war -->
+      <war warfile="${build.lib}/jbpapp6523.war"
+	   webxml="${build.resources}/${jbpapp6523}/war/WEB-INF/web.xml">
+	 <classes dir="${build.resources}/${jbpapp6523}/war/WEB-INF/classes"/>
+	 <lib dir="${build.resources}/${jbpapp6523}/war/WEB-INF/lib"/>
+         <lib dir="${build.lib}">
+            <include name="dummy-log.jar"/>
+         </lib>
+	 <fileset dir="${build.resources}/${jbpapp6523}/war">
+	   <include name="index.jsp"/>
+	 </fileset>
+      </war>      
+   </target>
+</project>

Modified: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/server-config.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/server-config.xml	2011-06-01 16:25:32 UTC (rev 111501)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/server-config.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -433,7 +433,7 @@
       <server name="dtm2" host="${node2}">
         <sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
         <sysproperty key="java.net.preferIPv6Addresses" value="${java.net.preferIPv6Addresses}" />
-   	  </server>
+      </server>
       <server name="dtm3" host="${node3}">
         <sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
         <sysproperty key="java.net.preferIPv6Addresses" value="${java.net.preferIPv6Addresses}" />
@@ -473,6 +473,12 @@
        <sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
         <sysproperty key="java.net.preferIPv6Addresses" value="${java.net.preferIPv6Addresses}" />
     </server>
+    <server name="jbpapp6523-use_tccl-false" host="${node0}">
+       <sysproperty key="org.apache.commons.logging.use_tccl" value="false"/>
+    </server>
+    <server name="jbpapp6523-use_tccl-true" host="${node0}">
+       <sysproperty key="org.apache.commons.logging.use_tccl" value="true"/>
+    </server>
     <server name="cc" host="${node0}" config="cc">
        <jvmarg value="${jpda.cmdline}" />
        <jvmarg value="-Xmx128m" />

Modified: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/test-jars.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/test-jars.xml	2011-06-01 16:25:32 UTC (rev 111501)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/imports/test-jars.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -16,6 +16,7 @@
 	<import file="sections/client.xml"/>
 	<import file="sections/cluster.xml"/>
 	<import file="sections/cmp.xml"/>
+	<import file="sections/commons_logging.xml"/>
 	<import file="sections/cookie.xml"/>
 	<import file="sections/cts.xml"/>
 	<import file="sections/dbtest.xml"/>
@@ -92,6 +93,7 @@
       _jars-client,
       _jars-cluster,
       _jars-cmp2,
+      _jars-commons_logging,
       _jars-cookie,
       _jars-cts,
       _jars-dbtest,

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/CommonsLoggingBaseTestCase.java
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/CommonsLoggingBaseTestCase.java	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/CommonsLoggingBaseTestCase.java	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.commons_logging.jbpapp6523.test;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectName;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
+
+/**
+ * Base test class for commons logging tests.
+ * <p>
+ * This class includes funcitonality to interact with the MainDeployer so that it
+ * can be reused for both EAP 4 and EAP 5.
+ * <p>
+ * This class includes URL status checking funcitonality as well.
+ *
+ * @author jiwils
+ */
+public abstract class CommonsLoggingBaseTestCase extends TestCase
+{
+   private String host = "localhost";
+   
+   protected final String DEPLOYMENT_URL =
+      "file://" + new File("lib/jbpapp6523.war").getAbsolutePath();
+   
+   /**
+    * Tests that the test servlet is available and that the response code
+    * is as expected.
+    */
+   protected void assertServlet(int expectedResponseCode)
+   {
+   }
+
+   /**
+    * Retrieves the initial JNDI context from which to retrieve the RMIAdapter.
+    */
+   protected InitialContext getInitialContext(String host)
+   throws NamingException
+   {
+      if (host == null)
+      {
+         return new InitialContext();
+      }
+      else
+      {
+         Properties props = new Properties();
+         props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+         props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
+         props.put(Context.PROVIDER_URL, "jnp://"+host+":1099");
+         props.put("jnp.disableDiscovery", "true");
+
+         return new InitialContext(props);
+      }
+   }
+
+   /**
+    * Retrieves the MainDeployer MBean proxy.
+    */
+   protected MainDeployerMBean getMainDeployer()
+   throws MalformedObjectNameException, NamingException
+   {
+      final String MAIN_DEPLOYER_OBJECT_NAME_STR =
+                           "jboss.system:service=MainDeployer";
+
+      final ObjectName MAIN_DEPLOYER_OBJECT_NAME =
+                           ObjectName.getInstance(MAIN_DEPLOYER_OBJECT_NAME_STR);
+
+      MBeanServerConnection server = getRMIServer();
+
+      Object proxy =
+         MBeanServerInvocationHandler.newProxyInstance(server, MAIN_DEPLOYER_OBJECT_NAME,
+                                                       MainDeployerMBean.class, false);
+
+      MainDeployerMBean mainDeployer = (MainDeployerMBean) proxy;
+
+      return mainDeployer;   
+   }
+
+   /**
+    * Retrieves the RMIAdapter from JNDI.
+    */
+   protected MBeanServerConnection getRMIServer()
+   throws NamingException
+   {
+      final String CONNECTOR_NAME = "jmx/rmi/RMIAdaptor";
+
+      RMIAdaptor server = (RMIAdaptor) getInitialContext(host).lookup(CONNECTOR_NAME);
+
+      return server;
+   }
+}
\ No newline at end of file

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLFalseTestCase.java
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLFalseTestCase.java	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLFalseTestCase.java	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.commons_logging.jbpapp6523.test;
+
+import java.io.IOException;
+
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.management.MalformedObjectNameException;
+
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.MainDeployerMBean;
+
+/**
+ * @author jiwils
+ */
+public class UseTCCLFalseTestCase extends CommonsLoggingBaseTestCase
+{
+   public void testUseTCCLFalse()
+   throws DeploymentException, IOException, MalformedObjectNameException,
+          MalformedURLException, NamingException
+   {
+      MainDeployerMBean mainDeployer = getMainDeployer();
+      mainDeployer.deploy(DEPLOYMENT_URL);
+
+      URL servletURL = new URL("http://" + "localhost" + ":8080/" + "jbpapp6523/");
+      HttpURLConnection connection = (HttpURLConnection) servletURL.openConnection();
+      int responseCode = connection.getResponseCode();
+      connection.disconnect();
+      mainDeployer.undeploy(DEPLOYMENT_URL);
+      assertEquals(200, responseCode);
+   }   
+}
\ No newline at end of file

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLTrueTestCase.java
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLTrueTestCase.java	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/test/UseTCCLTrueTestCase.java	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.commons_logging.jbpapp6523.test;
+
+import java.io.IOException;
+
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.management.MalformedObjectNameException;
+
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.MainDeployerMBean;
+
+/**
+ * @author jiwils
+ */
+public class UseTCCLTrueTestCase extends CommonsLoggingBaseTestCase
+{
+   public void testUseTCCLTrue()
+   throws DeploymentException, IOException, MalformedObjectNameException,
+          MalformedURLException, NamingException
+   {
+      MainDeployerMBean mainDeployer = getMainDeployer();
+      mainDeployer.deploy(DEPLOYMENT_URL);
+
+      URL servletURL = new URL("http://" + "localhost" + ":8080/" + "jbpapp6523/");
+      HttpURLConnection connection = (HttpURLConnection) servletURL.openConnection();
+      int responseCode = connection.getResponseCode();
+      connection.disconnect();
+      mainDeployer.undeploy(DEPLOYMENT_URL);
+      assertEquals(500, responseCode);
+   }
+}
\ No newline at end of file

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/war/DummyLog.java
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/war/DummyLog.java	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/main/org/jboss/test/commons_logging/jbpapp6523/war/DummyLog.java	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,94 @@
+package org.jboss.test.commons_logging.jbpapp6523.war;
+
+import org.apache.commons.logging.Log;
+
+/**
+ * A dummy log class to cause the behavior described in JBPAPP-6523 when use_tccl=true.
+ */
+public class DummyLog implements Log
+{
+   public DummyLog()
+   {
+      // This should never print as the problem happens before commons logging
+      // logger consruction.
+      System.out.println("DummyLog consructor...");
+   }
+
+   public void debug(Object arg0)
+   {
+   }
+
+   public void debug(Object arg0, Throwable arg1)
+   {
+   }
+
+   public void error(Object arg0)
+   {
+   }
+
+   public void error(Object arg0, Throwable arg1)
+   {
+   }
+
+   public void fatal(Object arg0)
+   {
+   }
+
+   public void fatal(Object arg0, Throwable arg1)
+   {
+   }
+
+   public void info(Object arg0)
+   {
+   }
+
+   public void info(Object arg0, Throwable arg1)
+   {
+   }
+
+   public boolean isDebugEnabled()
+   {
+      return true;
+   }
+
+   public boolean isErrorEnabled()
+   {
+      return true;
+   }
+
+   public boolean isFatalEnabled()
+   {
+      return true;
+   }
+
+   public boolean isInfoEnabled()
+   {
+      return true;
+   }
+
+   public boolean isTraceEnabled()
+   {
+      return true;
+   }
+
+   public boolean isWarnEnabled()
+   {
+      return true;
+   }
+
+   public void trace(Object arg0)
+   {
+   }
+
+   public void trace(Object arg0, Throwable arg1)
+   {
+   }
+
+   public void warn(Object arg0)
+   {
+   }
+
+   public void warn(Object arg0, Throwable arg1)
+   {
+   }
+}
\ No newline at end of file

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/classes/commons-logging.properties
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/classes/commons-logging.properties	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/classes/commons-logging.properties	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1 @@
+org.apache.commons.logging.Log=org.jboss.test.commons_logging.jbpapp6523.war.DummyLog

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/lib/old-commons-logging.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/lib/old-commons-logging.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/web.xml
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/web.xml	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/WEB-INF/web.xml	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<web-app version="2.5"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" >
+
+   <welcome-file-list>
+      <welcome-file>/index.jsp</welcome-file>
+   </welcome-file-list>
+</web-app>

Added: branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/index.jsp
===================================================================
--- branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/index.jsp	                        (rev 0)
+++ branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-6525/testsuite/src/resources/org/jboss/test/commons_logging/jbpapp6523/war/index.jsp	2011-06-01 19:40:37 UTC (rev 111502)
@@ -0,0 +1,12 @@
+<html>
+   <body>
+      <strong>JBPAPP-6523 Test Web Application</strong>
+
+      <p>This text should only show when the system property
+      org.apache.commons.logging.use_tccl is set to false.</p>
+
+      <p>The default value for this property is true.</p>
+
+      <p>When set to true, this JSP will not compile.</p>
+   </body>
+</html>
\ No newline at end of file



More information about the jboss-cvs-commits mailing list