[jboss-svn-commits] JBossWS SVN: r978 - branches/jbossws-1.0/src/test/java/org/jboss/test/ws
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 18 09:56:58 EDT 2006
Author: heiko.braun at jboss.com
Date: 2006-09-18 09:56:55 -0400 (Mon, 18 Sep 2006)
New Revision: 978
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java
Log:
Allow access to the scneario config on the client side
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java 2006-09-18 13:56:24 UTC (rev 977)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java 2006-09-18 13:56:55 UTC (rev 978)
@@ -21,12 +21,15 @@
*/
package org.jboss.test.ws;
+import junit.extensions.TestSetup;
+import junit.framework.TestSuite;
import java.util.StringTokenizer;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URLClassLoader;
+import java.net.URL;
-import junit.extensions.TestSetup;
-import junit.framework.TestSuite;
-
/**
* A test setup that deploys/undeploys archives
*
@@ -56,6 +59,7 @@
protected void setUp() throws Exception
{
+ List clientJars = new ArrayList();
for (int i = 0; i < archives.length; i++)
{
String archive = archives[i];
@@ -72,7 +76,26 @@
delegate.undeploy(archive);
}
}
+
+ if (isJ2EEClient)
+ {
+ URL archiveURL = delegate.getArchiveURL(archive);
+ clientJars.add(archiveURL);
+ }
}
+
+ // add the client jars to the classloader
+ if( !clientJars.isEmpty() )
+ {
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ URL[] urls = new URL[clientJars.size()];
+ for(int i=0; i<clientJars.size(); i++)
+ {
+ urls[i] = (URL)clientJars.get(i);
+ }
+ URLClassLoader cl = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(cl);
+ }
}
protected void tearDown() throws Exception
More information about the jboss-svn-commits
mailing list