final WebModule webModule = (WebModule) module; finder = newFinder(new WebappAggregatedArchive(webModule, webModule.getScannableUrls())); if (!finder.foundSomething()) { // test case (AppComposer with new WebApp()) finder = fallbackAnnotationFinder(module); final ConnectorModule connectorModule = (ConnectorModule) module; finder = newFinder(new ConfigurableClasspathArchive(connectorModule, connectorModule.getLibraries())); if (!finder.foundSomething()) { // test case finder = fallbackAnnotationFinder(module); final Collection<URL> urls = NewLoaderLogic.applyBuiltinExcludes(new UrlSet(AppModule.class.cast(module).getAdditionalLibraries())).getUrls(); finder = newFinder(new WebappAggregatedArchive(module.getClassLoader(), module.getAltDDs(), urls)); if (!finder.foundSomething()) { // test case finder = fallbackAnnotationFinder(module); finder = newFinder(new DebugArchive(new ConfigurableClasspathArchive(module.getClassLoader(), url))); if (!finder.foundSomething()) { // test case too, should be removed in absolute. Next else should be hit but if jar location was set we are here. finder = fallbackAnnotationFinder(module);
private OpenEJBAnnotationFinder useFallbackFinderIfNeededOrLink(final DeploymentModule module, final OpenEJBAnnotationFinder finder) { if (!finder.foundSomething()) { // test case (AppComposer with new WebApp()) final OpenEJBAnnotationFinder fbFinder = fallbackAnnotationFinder(module); if (fbFinder.foundSomething()) { return fbFinder; } } finder.link(); return finder; }