Search in sources :

Example 1 with ConfigurableClasspathArchive

use of org.apache.openejb.config.ConfigurableClasspathArchive in project tomee by apache.

the class AbstractXmlAnnotationFinderTest method initFinder.

@Before
public void initFinder() throws Exception {
    final ClassLoader loader = Thread.currentThread().getContextClassLoader();
    System.setProperty(SCAN_XML_PROPERTY, scanXml());
    finder = new AnnotationFinder(new ConfigurableClasspathArchive(loader, Arrays.asList(new URL(loader.getResource(scanXml()).toExternalForm().replace(scanXml(), "")))));
    System.clearProperty("openejb.scan.xml.name");
}
Also used : ConfigurableClasspathArchive(org.apache.openejb.config.ConfigurableClasspathArchive) AnnotationFinder(org.apache.xbean.finder.AnnotationFinder) IAnnotationFinder(org.apache.xbean.finder.IAnnotationFinder) URL(java.net.URL) Before(org.junit.Before)

Aggregations

URL (java.net.URL)1 ConfigurableClasspathArchive (org.apache.openejb.config.ConfigurableClasspathArchive)1 AnnotationFinder (org.apache.xbean.finder.AnnotationFinder)1 IAnnotationFinder (org.apache.xbean.finder.IAnnotationFinder)1 Before (org.junit.Before)1