@After public void cleanup() { if (this.context != null) { this.context.close(); } }
@After public void cleanup() { if (context != null) { context.close(); } }
@After public void cleanup() { if (this.context != null) { this.context.close(); } }
@After public void cleanup() { if (context != null) { context.close(); } }
@After public void cleanup() { if (this.context != null) { this.context.close(); } }
@After public void cleanup() { if (this.context != null) { this.context.close(); } }
@After public void cleanup() { if (context != null) { context.close(); } }
@After public void cleanup() { if (context != null) { context.close(); } }
@After public void tearDown() throws Exception { try { this.server.undeployConfig(); } catch (Throwable t) { logger.error("Failed to undeploy application config", t); } try { this.server.stop(); } catch (Throwable t) { logger.error("Failed to stop server", t); } try { this.wac.close(); } catch (Throwable t) { logger.error("Failed to close WebApplicationContext", t); } }
@After public void teardown() throws Exception { try { this.sockJsClient.stop(); } catch (Throwable ex) { logger.error("Failed to stop SockJsClient", ex); } try { this.server.undeployConfig(); } catch (Throwable t) { logger.error("Failed to undeploy application config", t); } try { this.server.stop(); } catch (Throwable t) { logger.error("Failed to stop server", t); } try { this.wac.close(); } catch (Throwable t) { logger.error("Failed to close WebApplicationContext", t); } }
@After public void teardown() throws Exception { try { if (this.webSocketClient instanceof Lifecycle) { ((Lifecycle) this.webSocketClient).stop(); } } catch (Throwable t) { logger.error("Failed to stop WebSocket client", t); } try { this.server.undeployConfig(); } catch (Throwable t) { logger.error("Failed to undeploy application config", t); } try { this.server.stop(); } catch (Throwable t) { logger.error("Failed to stop server", t); } try { this.wac.close(); } catch (Throwable t) { logger.error("Failed to close WebApplicationContext", t); } }
@Test public void runSpringHttpSessionConfig() { AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); context.register(SpringHttpSessionConfig.class); context.setServletContext(new MockServletContext()); context.refresh(); try { context.getBean(SessionRepositoryFilter.class); } finally { context.close(); } }
public void contextDestroyed(ServletContextEvent sce) { log.info("Destroying Web application"); WebApplicationContext ac = WebApplicationContextUtils.getRequiredWebApplicationContext(sce.getServletContext()); AnnotationConfigWebApplicationContext gwac = (AnnotationConfigWebApplicationContext) ac; gwac.close(); log.debug("Web application destroyed"); } }
@After public void close() { if (this.context != null) { this.context.close(); } }
@After public void close() { if (this.context != null) { this.context.close(); } }
@After public void close() { if (this.context != null) { this.context.close(); } }
@After public void close() { if (this.context != null) { this.context.close(); } }
@After public void close() { if (this.context != null) { this.context.close(); } }
@After public void close() { if (this.context != null) { this.context.close(); } }
@After public void close() { if (this.context != null) { this.context.close(); } }