public void contextInitialized(ServletContextEvent sce) { context = sce.getServletContext(); // Use JVM properties as external config setConfig(System.getProperties()); // Initialise the registerable drivers try { mountContexts.put("classpath", new ClassPathMountFactory(context.getClassLoader())); mountContexts.put("file", new FileMountFactory(Utils.getCurrentDirectory())); mountContexts.put("war", new WarMountFactory(context)); } catch (Exception e) { log.log(Level.SEVERE, "Coult not initialize classpath driver", e); return; } // String contextPath = context.getContextPath(); synchronized (lock) { if (!contextMap.containsKey(contextPath)) { ClassLoader webAppLoader = Thread.currentThread().getContextClassLoader(); PluginDiscovery discovery = createDiscovery(context, webAppLoader); PluginContext pluginContext = start(new ServletContextMap(context), discovery, context.getClassLoader()); contextMap.put(contextPath, pluginContext); registered = true; } } }
public void contextDestroyed(ServletContextEvent sce) { if (registered) { // ServletContext sc = sce.getServletContext(); String contextPath = sc.getContextPath(); // synchronized (lock) { // contextMap.remove(contextPath); registered = false; // stop(); } } } }
/** * @return the value returned by {@link #resolvePathProperty(String, String)} with the <code>crash.mountpointconfig.cmd</code> name * and the {@link #getDefaultCmdMountPointConfig()} default value */ @Override protected String resolveCmdMountPointConfig() { return resolvePathProperty("crash.mountpointconfig.cmd", getDefaultCmdMountPointConfig()); }
/** * @return the value returned by {@link #resolvePathProperty(String, String)} with the <code>crash.mountpointconfig.conf</code> name * and the {@link #getDefaultConfMountPointConfig()} default value */ @Override protected String resolveConfMountPointConfig() { return resolvePathProperty("crash.mountpointconfig.conf", getDefaultConfMountPointConfig()); }
public void contextInitialized(ServletContextEvent sce) { ServletContext context = sce.getServletContext(); String contextPath = context.getContextPath(); // Use JVM properties as external config setConfig(System.getProperties()); // synchronized (lock) { if (!contextMap.containsKey(contextPath)) { // FS cmdFS = createCommandFS(context); FS confFS = createConfFS(context); ClassLoader webAppLoader = Thread.currentThread().getContextClassLoader(); // PluginContext pluginContext = new PluginContext( createDiscovery(context, webAppLoader), new ServletContextMap(context), cmdFS, confFS, webAppLoader); // contextMap.put(contextPath, pluginContext); registered = true; // start(pluginContext); } } }
/** * @return the value returned by {@link #resolvePathProperty(String, String)} with the <code>crash.mountpointconfig.conf</code> name * and the {@link #getDefaultConfMountPointConfig()} default value */ @Override protected String resolveConfMountPointConfig() { return resolvePathProperty("crash.mountpointconfig.conf", getDefaultConfMountPointConfig()); }
public void contextInitialized(ServletContextEvent sce) { context = sce.getServletContext(); // Use JVM properties as external config setConfig(System.getProperties()); // Initialise the registerable drivers try { mountContexts.put("classpath", new ClassPathMountFactory(context.getClassLoader())); mountContexts.put("file", new FileMountFactory(Utils.getCurrentDirectory())); mountContexts.put("war", new WarMountFactory(context)); } catch (Exception e) { log.log(Level.SEVERE, "Coult not initialize classpath driver", e); return; } // String contextPath = context.getContextPath(); synchronized (lock) { if (!contextMap.containsKey(contextPath)) { ClassLoader webAppLoader = Thread.currentThread().getContextClassLoader(); PluginDiscovery discovery = createDiscovery(context, webAppLoader); PluginContext pluginContext = start(new ServletContextMap(context), discovery, context.getClassLoader()); contextMap.put(contextPath, pluginContext); registered = true; } } }
/** * @return the value returned by {@link #resolvePathProperty(String, String)} with the <code>crash.mountpointconfig.conf</code> name * and the {@link #getDefaultConfMountPointConfig()} default value */ @Override protected String resolveConfMountPointConfig() { return resolvePathProperty("crash.mountpointconfig.conf", getDefaultConfMountPointConfig()); }
/** * @return the value returned by {@link #resolvePathProperty(String, String)} with the <code>crash.mountpointconfig.cmd</code> name * and the {@link #getDefaultCmdMountPointConfig()} default value */ @Override protected String resolveCmdMountPointConfig() { return resolvePathProperty("crash.mountpointconfig.cmd", getDefaultCmdMountPointConfig()); }
public void contextDestroyed(ServletContextEvent sce) { if (registered) { // ServletContext sc = sce.getServletContext(); String contextPath = sc.getContextPath(); // synchronized (lock) { // contextMap.remove(contextPath); registered = false; // stop(); } } } }
public void contextInitialized(ServletContextEvent sce) { context = sce.getServletContext(); // Use JVM properties as external config setConfig(System.getProperties()); // Initialise the registerable drivers try { mountContexts.put("classpath", new ClassPathMountFactory(context.getClassLoader())); mountContexts.put("file", new FileMountFactory(Utils.getCurrentDirectory())); mountContexts.put("war", new WarMountFactory(context)); } catch (Exception e) { log.log(Level.SEVERE, "Coult not initialize classpath driver", e); return; } // String contextPath = context.getContextPath(); synchronized (lock) { if (!contextMap.containsKey(contextPath)) { ClassLoader webAppLoader = Thread.currentThread().getContextClassLoader(); PluginDiscovery discovery = createDiscovery(context, webAppLoader); PluginContext pluginContext = start(new ServletContextMap(context), discovery, context.getClassLoader()); contextMap.put(contextPath, pluginContext); registered = true; } } }
/** * @return the value returned by {@link #resolvePathProperty(String, String)} with the <code>crash.mountpointconfig.cmd</code> name * and the {@link #getDefaultCmdMountPointConfig()} default value */ @Override protected String resolveCmdMountPointConfig() { return resolvePathProperty("crash.mountpointconfig.cmd", getDefaultCmdMountPointConfig()); }
public void contextDestroyed(ServletContextEvent sce) { if (registered) { // ServletContext sc = sce.getServletContext(); String contextPath = sc.getContextPath(); // synchronized (lock) { // contextMap.remove(contextPath); registered = false; // stop(); } } } }
public void contextDestroyed(ServletContextEvent sce) { if (registered) { // ServletContext sc = sce.getServletContext(); String contextPath = sc.getContextPath(); // synchronized (lock) { // contextMap.remove(contextPath); registered = false; // stop(); } } } }