public void stopAndCloseApplicationContext() { try { XmlWebApplicationContext ctx = (XmlWebApplicationContext) getWebApplicationContext(); ctx.stop(); ctx.close(); } catch (Exception e) { log.error("Exception while stopping and closing static content dispatcher servlet context: ", e); } } }
/** * Stops and closes the application context created by this dispatcher servlet. */ public void stopAndCloseApplicationContext() { try { XmlWebApplicationContext ctx = (XmlWebApplicationContext) getWebApplicationContext(); ctx.stop(); ctx.close(); } catch (Exception e) { log.error("Exception while stopping and closing dispatcherServlet context: ", e); } } }
public void destroyBus() { if (busCreated) { //if we created the Bus, we need to destroy it. Otherwise, spring will handleit. getBus().shutdown(true); setBus(null); } if (createdContext != null) { createdContext.close(); } }
/** * Cleans up all application contexts and invalidates the session. */ public void close() { session.destroy(); rootContext.close(); }
private void destroyTemporaryContext() { if (temporaryContext != null) { if (groupManagementService instanceof GroupManagementServiceWrapper) { ((GroupManagementServiceWrapper) groupManagementService).setDelegate(null); } temporaryContext.close(); temporaryContext = null; } }
private void destroyTemporaryContext() { if (temporaryContext != null) { if (groupManagementService instanceof GroupManagementServiceWrapper) { ((GroupManagementServiceWrapper) groupManagementService).setDelegate(null); } temporaryContext.close(); temporaryContext = null; } }
/** * Destroys the application context associated with the specified page. * * @param page Page instance */ public static void destroyAppContext(Page page) { XmlWebApplicationContext appContext = getAppContext(page); if (appContext != null) { appContext.close(); } }
public void close() { super.close(); if (filesystemAlterationMonitor != null) { filesystemAlterationMonitor.removeListener(this); filesystemAlterationMonitor.stop(); } }
public void destroyBus() { if (busCreated) { //if we created the Bus, we need to destroy it. Otherwise, spring will handleit. getBus().shutdown(true); setBus(null); } if (createdContext != null) { createdContext.close(); } }
public void destroyBus() { if (busCreated) { //if we created the Bus, we need to destroy it. Otherwise, spring will handleit. getBus().shutdown(true); setBus(null); } if (createdContext != null) { createdContext.close(); } }
private void migrateDatabase(final Map<String, Object> dbProperties) { XmlWebApplicationContext ctx = null; try { ctx = new XmlWebApplicationContext(); ctx.setServletContext(FacesUtils.getServletContext()); ctx.setConfigLocations("classpath:META-INF/standalone/spring/security-hibernate-beans.xml"); ctx.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { beanFactory.registerSingleton("dbConfig", dbProperties); } }); ctx.refresh(); ctx.getBean("dbMigration"); } finally { if (ctx != null) { ctx.close(); } } }