protected void removeCompilePath(Path path) { try { String url = toUrlString(path); Path old = urlMap.remove(url); if (old != null) { scheduleRecompile(); } } catch (MalformedURLException e) { LOG.warn("Ignored path " + path + " due to: " + e, e); } }
protected void removePath(Path path) { try { String url = toUrlString(path); FileSystemXmlApplicationContext context = contextMap.remove(url); closeContext(url, context); } catch (MalformedURLException e) { LOG.warn("Ignored path " + path + " due to: " + e, e); } }
protected void addCompilePath(Path path) { try { String url = toUrlString(path); Path old = urlMap.put(url, path); if (old == null) { scheduleRecompile(); } } catch (MalformedURLException e) { LOG.warn("Ignored path " + path + " due to: " + e, e); } }
protected void addPath(Path path) { String url = null; try { url = toUrlString(path); } catch (MalformedURLException e) { LOG.warn("Ignored path " + path + " due to: " + e, e); } if (url != null) { FileSystemXmlApplicationContext context = contextMap.get(url); if (context != null) { try { LOG.info("Refreshing context at path " + path + " context " + context); context.refresh(); } catch (Exception e) { LOG.warn("Failed to refresh context at " + path + " context " + context + ". " + e, e); } } else { context = createContext(path, url); if (context != null) { contextMap.put(url, context); try { LOG.info("Starting context at path " + path + " context " + context); context.start(); } catch (Exception e) { LOG.warn("Failed to start context at " + path + " context " + context + ". " + e, e); } } } } }