@Override public ClassLoader getClassLoader() { try { return getSystemLoader(); } catch (final Exception e) { throw new LoaderRuntimeException(e); } }
public static void unzip(final File zipFile, final File destination, final boolean noparent) throws IOException { Files.dir(destination); Files.writable(destination); Files.file(zipFile); Files.readable(zipFile); final InputStream read = IO.read(zipFile); try { unzip(read, destination, noparent); } finally { IO.close(read); } }
private static File tmpDir() throws IOException { File dir = UrlCache.cacheDir; if (null == dir) { dir = SystemInstance.get().getBase().getDirectory("tmp", true); } return dir; }
public static String routerConfigurationName() { final String conf = SystemInstance.get().getOptions().get(DeploymentLoader.OPENEJB_ALTDD_PREFIX, (String) null); if (conf == null) { return ROUTER_CONF; } else { return conf + "." + ROUTER_CONF; } }
public ClasspathSearcher() { final Options options = SystemInstance.get().getOptions(); include = options.get(CLASSPATH_INCLUDE, ".*"); exclude = options.get(CLASSPATH_EXCLUDE, ""); filterSystemApps = options.get(CLASSPATH_FILTER_SYSTEMAPPS, true); requireDescriptors = options.getAll(CLASSPATH_REQUIRE_DESCRIPTOR, RequireDescriptors.CLIENT); filterDescriptors = options.get(CLASSPATH_FILTER_DESCRIPTORS, false); }
public TempClassLoader(ClassLoader parent) { super(new URL[0], parent); Options options = SystemInstance.get().getOptions(); skip = options.getAll("openejb.tempclassloader.skip", Skip.NONE); }
public String get(final String property, final String defaultValue) { final String value = properties.getProperty(property); return value != null ? log(property, value) : parent.get(property, defaultValue); }
@SuppressWarnings("checkstyle:needbraces") public static ClassPath createClassPath(final String name) { if (name.equalsIgnoreCase("tomcat")) return new TomcatClassPath(); if (name.equalsIgnoreCase("tomcat-common")) return new TomcatClassPath(); if (name.equalsIgnoreCase("tomcat-system")) return new TomcatClassPath(); if (name.equalsIgnoreCase("tomcat-webapp")) return new WebAppClassPath(); if (name.equalsIgnoreCase("bootstrap") && isSystemSupported()) return new SystemClassPath(); if (name.equalsIgnoreCase("system") && isSystemSupported()) return new SystemClassPath(); if (name.equalsIgnoreCase("thread")) return new ContextClassPath(); if (name.equalsIgnoreCase("context")) return new ContextClassPath(); return new ContextClassPath(); }
private static boolean shouldAutoDeploy() { final Options options = SystemInstance.get().getOptions(); final boolean b = options.get(ConfigurationFactory.OFFLINE_PROPERTY, false); return options.get("tomee.autoconfig", !b); }
public static void unzip(final File zipFile, final File destination, final boolean noparent) throws IOException { Files.dir(destination); Files.writable(destination); Files.file(zipFile); Files.readable(zipFile); final InputStream read = IO.read(zipFile); try { unzip(read, destination, noparent); } finally { IO.close(read); } }
@SuppressWarnings("checkstyle:needbraces") public static ClassPath createClassPath(final String name) { if (name.equalsIgnoreCase("tomcat")) return new TomcatClassPath(); if (name.equalsIgnoreCase("tomcat-common")) return new TomcatClassPath(); if (name.equalsIgnoreCase("tomcat-system")) return new TomcatClassPath(); if (name.equalsIgnoreCase("tomcat-webapp")) return new WebAppClassPath(); if (name.equalsIgnoreCase("bootstrap")) return new SystemClassPath(); if (name.equalsIgnoreCase("system")) return new SystemClassPath(); if (name.equalsIgnoreCase("thread")) return new ContextClassPath(); if (name.equalsIgnoreCase("context")) return new ContextClassPath(); return new ContextClassPath(); } }
@Override public ClassLoader getClassLoader() { try { return getSystemLoader(); } catch (final Exception e) { throw new LoaderRuntimeException(e); } }
public String toScreen() { final String str = "both files " + file1 + '\'' + " and " + file2 + '\''; if (SystemInstance.get().getOptions().get(OPENEJB_CHECK_CLASSLOADER_VERBOSE, false)) { return str + " contains files=" + files; } return str; } }
public static boolean extractConfigurationFiles() { return SystemInstance.get().getOptions().get(AUTO_CONFIGURE, true); } }
public String toScreen() { final String str = "both files " + file1 + '\'' + " and " + file2 + '\''; if (SystemInstance.get().getOptions().get(OPENEJB_CHECK_CLASSLOADER_VERBOSE, false)) { return str + " contains files=" + files; } return str; } }
private static boolean shouldAutoDeploy() { final Options options = SystemInstance.get().getOptions(); final boolean b = options.get(ConfigurationFactory.OFFLINE_PROPERTY, false); return options.get("tomee.autoconfig", !b); }
public static boolean isStatsActivated() { return SystemInstance.get().getOptions().get(DISABLE_STAT_INTERCEPTOR_PROPERTY, true); } }