[jboss-cvs] JBossAS SVN: r93957 - projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 23 12:15:54 EDT 2009
Author: jesper.pedersen
Date: 2009-09-23 12:15:53 -0400 (Wed, 23 Sep 2009)
New Revision: 93957
Modified:
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
Log:
Pass the context class loader as an argument
Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java 2009-09-23 16:04:36 UTC (rev 93956)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java 2009-09-23 16:15:53 UTC (rev 93957)
@@ -27,6 +27,7 @@
import org.jboss.jca.fungal.deployers.DeployException;
import java.io.File;
+import java.io.IOException;
import java.net.URL;
import org.jboss.logging.Logger;
@@ -54,7 +55,7 @@
// Class Members ------------------------------------------------------------------||
// --------------------------------------------------------------------------------||
- private static final Logger LOG = Logger.getLogger(AnnotationsTestCase.class);
+ private static Logger log = Logger.getLogger(AnnotationsTestCase.class);
/*
* Embedded
@@ -97,7 +98,7 @@
{
URL url = getURL("ra16inout.rar");
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
- AnnotationRepository ar = asf.scan(new URL[] {url});
+ AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
Annotations.process(null, ar);
}
@@ -118,7 +119,7 @@
{
URL url = getURL("ra16inoutnora.rar");
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
- AnnotationRepository ar = asf.scan(new URL[] {url});
+ AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
Annotations.process(null, ar);
}
@@ -139,7 +140,7 @@
{
URL url = getURL("rafail2connector.rar");
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
- AnnotationRepository ar = asf.scan(new URL[] {url});
+ AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
Annotations.process(null, ar);
@@ -180,7 +181,12 @@
*/
public URL getURL(String archive) throws Throwable
{
- File f = new File(System.getProperty("archives.dir") + File.separator + archive);
+ String fileName = System.getProperty("archives.dir") + File.separator + archive;
+ File f = new File(fileName);
+
+ if (!f.exists())
+ throw new IOException("Archive: " + fileName + " doesn't exists");
+
return f.toURI().toURL();
}
}
More information about the jboss-cvs-commits
mailing list