[jboss-svn-commits] JBossWS SVN: r633 - in branches/jbossws-1.0/src/test/java/org/jboss/test/ws: . eventing
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jul 25 08:05:00 EDT 2006
Author: heiko.braun at jboss.com
Date: 2006-07-25 08:04:55 -0400 (Tue, 25 Jul 2006)
New Revision: 633
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestHelper.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/eventing/DIIClientTestCase.java
Log:
dynamically include client jar in classpath, required for DII tests
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestHelper.java 2006-07-24 15:18:55 UTC (rev 632)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestHelper.java 2006-07-25 12:04:55 UTC (rev 633)
@@ -93,7 +93,7 @@
}
/** Try to discover the URL for the deployment archive */
- private URL getArchiveURL(String archive) throws MalformedURLException
+ public URL getArchiveURL(String archive) throws MalformedURLException
{
URL url = null;
try
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-07-24 15:18:55 UTC (rev 632)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/JBossWSTestSetup.java 2006-07-25 12:04:55 UTC (rev 633)
@@ -25,6 +25,10 @@
import junit.framework.TestSuite;
import java.util.StringTokenizer;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URLClassLoader;
+import java.net.URL;
/**
* A test setup that deploys/undeploys archives
@@ -55,6 +59,8 @@
protected void setUp() throws Exception
{
+ List<URL> clientJars = new ArrayList<URL>();
+
for (int i = 0; i < archives.length; i++)
{
String archive = archives[i];
@@ -71,7 +77,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] = clientJars.get(i);
+ }
+ URLClassLoader cl = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(cl);
+ }
}
protected void tearDown() throws Exception
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/eventing/DIIClientTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/eventing/DIIClientTestCase.java 2006-07-24 15:18:55 UTC (rev 632)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/eventing/DIIClientTestCase.java 2006-07-25 12:04:55 UTC (rev 633)
@@ -104,7 +104,8 @@
// construct service and setup handlers
ServiceFactoryImpl serviceFactory = (ServiceFactoryImpl)ServiceFactory.newInstance();
- ServiceExt service = (ServiceExt)serviceFactory.createService(new URL(wsdlLocation), SERVICE_NAME, mappingURL);
+ //ServiceExt service = (ServiceExt)serviceFactory.createService(new URL(wsdlLocation), SERVICE_NAME, mappingURL);
+ ServiceExt service = (ServiceExt)serviceFactory.createService(new URL(wsdlLocation), SERVICE_NAME);
setupHandlerRegistry(service);
return service;
More information about the jboss-svn-commits
mailing list