public void afterPropertiesSet() throws Exception { // Initialise the registerable drivers try { drivers.put("classpath", new ClassPathMountFactory(loader)); drivers.put("file", new FileMountFactory(Utils.getCurrentDirectory())); } catch (Exception e) { log.log(Level.SEVERE, "Coult not initialize classpath driver", e); return; } // List beans Map<String,Object> attributes = new HashMap<String, Object>(); attributes.put("factory", factory); if (factory instanceof ListableBeanFactory) { ListableBeanFactory listable = (ListableBeanFactory)factory; attributes.put("beans", new SpringMap(listable)); } // PluginDiscovery discovery = new SpringPluginDiscovery(loader, factory); // start(Collections.unmodifiableMap(attributes), discovery, loader); }
private FS.Builder createBuilder() throws IOException { FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory()); ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader()); return new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver); }
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; } } }
FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory()); ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader());
public void afterPropertiesSet() throws Exception { // Initialise the registerable drivers try { drivers.put("classpath", new ClassPathMountFactory(loader)); drivers.put("file", new FileMountFactory(Utils.getCurrentDirectory())); } catch (Exception e) { log.log(Level.SEVERE, "Coult not initialize classpath driver", e); return; } // List beans Map<String,Object> attributes = new HashMap<String, Object>(); attributes.put("factory", factory); if (factory instanceof ListableBeanFactory) { ListableBeanFactory listable = (ListableBeanFactory)factory; attributes.put("beans", new SpringMap(listable)); } // PluginDiscovery discovery = new SpringPluginDiscovery(loader, factory); // start(Collections.unmodifiableMap(attributes), discovery, loader); }
private FS.Builder createBuilder() throws IOException { FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory()); ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader()); return new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver); }
private FS.Builder createBuilder() throws IOException { FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory()); ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader()); return new FS.Builder().register("file", fileDriver).register("classpath", classpathDriver); }
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; } } }
FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory()); ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader());
FileMountFactory fileDriver = new FileMountFactory(Utils.getCurrentDirectory()); ClassPathMountFactory classpathDriver = new ClassPathMountFactory(Thread.currentThread().getContextClassLoader());