private static File file(URL jarUrl) { return URLs.toFile(jarUrl); } }
private WebModule createWebModule(final String jar, final URL warUrl, final ClassLoader parentClassLoader, final String contextRoot, final String moduleName, final ExternalConfiguration config) throws OpenEJBException { return createWebModule(jar, URLs.toFilePath(warUrl), parentClassLoader, contextRoot, moduleName, config); }
public void setRootUrl(final String rootUrl) { this.rootUrl = rootUrl; this.uri = URLs.uri(rootUrl); }
public static UrlSet cullSystemAndOpenEJBJars(final UrlSet original) throws IOException { return cullSystemJars(cullOpenEJBJars(original)); }
try { UrlSet urlSet = new UrlSet(ParentClassLoaderFinder.Helper.get()); urlSet = URLs.cullSystemJars(urlSet); urlSet = NewLoaderLogic.applyBuiltinExcludes(urlSet); containerUrls = urlSet.getUrls(); final Iterator<URL> it = containerUrls.iterator(); while (it.hasNext()) { // remove lib/ final File file = URLs.toFile(it.next()); final File[] files = unpack(URLs.toFile(url)).listFiles(); if (files != null) { for (final File f : files) { webModule.getWatchedResources().add(warFile.getAbsolutePath()); if (webXmlUrl != null && "file".equals(webXmlUrl.getProtocol())) { webModule.getWatchedResources().add(URLs.toFilePath(webXmlUrl));
try { urlSet = new UrlSet(classLoader); urlSet = URLs.cullSystemJars(urlSet); } catch (final IOException e) { throw new IllegalStateException(e); final int size = files.size(); for (final URL path : classpathAppsUrls) { final File file = URLs.toFile(path); if (file.getName().startsWith(v) && file.getName().endsWith(".jar")) { files.add(file);
try { tmpFile = File.createTempFile("AppModule-", "", UrlCache.cacheDir); JarExtractor.copy(URLs.toFile(baseUrl), tmpFile); tempURL = tmpFile.toURI().toURL(); } catch (Exception e) { String jarLocation = URLs.toFilePath(baseUrl); ClientModule clientModule = createClientModule(baseUrl, jarLocation, OpenEJB.class.getClassLoader(), null); String jarLocation = URLs.toFilePath(baseUrl); ConnectorModule connectorModule = createConnectorModule(jarLocation, jarLocation, OpenEJB.class.getClassLoader(), null); String moduleId = toFile(baseUrl).getName(); String warPath = URLs.toFilePath(baseUrl);
private static List<URL> urls(final ClassLoader classLoader) { UrlSet urlSet = new UrlSet(); if (classLoader instanceof URLClassLoader) { final URLClassLoader urlClassLoader = (URLClassLoader) classLoader; try { urlSet = new UrlSet(urlClassLoader.getURLs()); } catch (final NullPointerException npe) { // happen for closeable classloaders like WebappClassLoader when already clean up return Collections.emptyList(); } } else { try { urlSet = new UrlSet(classLoader); } catch (final IOException e) { DeploymentLoader.logger.warning("Error scanning class loader for JSP tag libraries", e); } } try { urlSet = URLs.cullSystemJars(urlSet); urlSet = applyBuiltinExcludes(urlSet, Filters.tokens("openejb-jstl", "myfaces-impl", "javax.faces-2.", "spring-security-taglibs", "spring-webmvc")); } catch (final IOException e) { DeploymentLoader.logger.warning("Error scanning class loader for JSP tag libraries", e); } return urlSet.getUrls(); }
try { urlSet = new UrlSet(classLoader); urlSet = URLs.cullSystemJars(urlSet); } catch (final IOException e) { throw new IllegalStateException(e); final int size = files.size(); for (final URL path : classpathAppsUrls) { final File file = URLs.toFile(path); if (file.getName().startsWith(v) && file.getName().endsWith(".jar")) { files.add(file);
final String jarLocation = URLs.toFilePath(baseUrl); final ClientModule clientModule = createClientModule(baseUrl, jarLocation, getOpenEJBClassLoader(), null); final String jarLocation = URLs.toFilePath(baseUrl); final ConnectorModule connectorModule = createConnectorModule(jarLocation, jarLocation, getOpenEJBClassLoader(), null); final File file = URLs.toFile(baseUrl); final String jarLocation = URLs.toFilePath(baseUrl); final ClassLoader classLoader = ClassLoaderUtil.createTempClassLoader(jarPath, new URL[]{baseUrl}, getOpenEJBClassLoader());
public static UrlSet cullSystemAndOpenEJBJars(final UrlSet original) throws IOException { return cullSystemJars(cullOpenEJBJars(original)); }
public ClasspathSearcher loadUrls(final ClassLoader classLoader) { try { final UrlSet original = cleanUpUrlSet(new UrlSet(classLoader)); urlSet = URLs.cullSystemJars(original);
public UrlComparator(URL base) { this(URLs.toFile(base)); }
private WebModule createWebModule(final String jar, final URL warUrl, final ClassLoader parentClassLoader, final String contextRoot, final String moduleName, final ExternalConfiguration config) throws OpenEJBException { return createWebModule(jar, URLs.toFilePath(warUrl), parentClassLoader, contextRoot, moduleName, config); }
try { UrlSet urlSet = new UrlSet(ParentClassLoaderFinder.Helper.get()); urlSet = URLs.cullSystemJars(urlSet); final PatternFilter containerIncludes = new PatternFilter(SystemInstance.get().getProperty(OPENEJB_CONTAINER_INCLUDES, ".*(geronimo|mp-jwt|failsafe).*")); final PatternFilter containerExcludes = new PatternFilter(SystemInstance.get().getProperty(OPENEJB_CONTAINER_EXCLUDES, "")); final Iterator<URL> it = containerUrls.iterator(); while (it.hasNext()) { // remove lib/ final File file = URLs.toFile(it.next());
public void setRootUrl(final String rootUrl) { this.rootUrl = rootUrl; this.uri = rootUrl == null ? null : URLs.uri(rootUrl); }
private static List<URL> urls(final ClassLoader classLoader) { UrlSet urlSet = new UrlSet(); if (classLoader instanceof URLClassLoader) { final URLClassLoader urlClassLoader = (URLClassLoader) classLoader; try { urlSet = new UrlSet(urlClassLoader.getURLs()); } catch (final NullPointerException npe) { // happen for closeable classloaders like WebappClassLoader when already clean up return Collections.emptyList(); } } else { try { urlSet = new UrlSet(classLoader); } catch (final IOException e) { DeploymentLoader.logger.warning("Error scanning class loader for JSP tag libraries", e); } } try { urlSet = URLs.cullSystemJars(urlSet); urlSet = applyBuiltinExcludes( urlSet, Filters.tokens("taglibs-standard-impl", "taglibs-standard-jstlel", "javax.faces-2.", "spring-security-taglibs", "spring-webmvc"), Filters.prefixes("commons-jcs-", "myfaces-", "tomcat-websocket.jar")); // myfaces is hardcoded in tomee } catch (final IOException e) { DeploymentLoader.logger.warning("Error scanning class loader for JSP tag libraries", e); } return urlSet.getUrls(); }
public UrlComparator(final URL base) { this(URLs.toFile(base)); }