@Override public void afterPropertiesSet() throws Exception { // Configure the war driver drivers.put("war", new WarMountFactory(servletContext)); // super.afterPropertiesSet(); }
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; } } }
@Override public void afterPropertiesSet() throws Exception { // Configure the war driver drivers.put("war", new WarMountFactory(servletContext)); // super.afterPropertiesSet(); }
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 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; } } }