[jboss-cvs] JBossAS SVN: r104865 - in projects/jboss-deployers/trunk/deployers-vfs/src/test: resources/classloading/cache/web/WEB-INF and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 17 06:00:04 EDT 2010
Author: alesj
Date: 2010-05-17 06:00:03 -0400 (Mon, 17 May 2010)
New Revision: 104865
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloading/support/MockServlet.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/classloading/cache/web/WEB-INF/jboss-beans.xml
Log:
Allow multiple class names, use DB example.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloading/support/MockServlet.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloading/support/MockServlet.java 2010-05-17 09:58:38 UTC (rev 104864)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloading/support/MockServlet.java 2010-05-17 10:00:03 UTC (rev 104865)
@@ -27,19 +27,22 @@
*/
public class MockServlet
{
- private String className;
+ private String[] classNames;
- public MockServlet(String className)
+ public MockServlet(String... classNames)
{
- if (className == null)
- throw new IllegalArgumentException("Null class name");
- this.className = className;
+ if (classNames == null)
+ throw new IllegalArgumentException("Null class names");
+ this.classNames = classNames;
}
public void ping() throws Exception
{
- ClassLoader cl = getClass().getClassLoader();
- Class<?> clazz = cl.loadClass(className);
- System.out.println("clazz = " + clazz);
+ for (String className : classNames)
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ Class<?> clazz = cl.loadClass(className);
+ System.out.println("clazz = " + clazz);
+ }
}
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/classloading/cache/web/WEB-INF/jboss-beans.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/classloading/cache/web/WEB-INF/jboss-beans.xml 2010-05-17 09:58:38 UTC (rev 104864)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/classloading/cache/web/WEB-INF/jboss-beans.xml 2010-05-17 10:00:03 UTC (rev 104865)
@@ -4,7 +4,7 @@
<bean name="Servlet" class="org.jboss.test.deployers.vfs.classloading.support.MockServlet">
<constructor>
- <parameter>org.jboss.dependency.spi.Controller</parameter>
+ <parameter>javax.xml.parsers.DocumentBuilder</parameter>
</constructor>
</bean>
More information about the jboss-cvs-commits
mailing list