Example usage for org.springframework.web.context.support XmlWebApplicationContext stop

List of usage examples for org.springframework.web.context.support XmlWebApplicationContext stop

Introduction

In this page you can find the example usage for org.springframework.web.context.support XmlWebApplicationContext stop.

Prototype

@Override
    public void stop() 

Source Link

Usage

From source file:org.openmrs.web.DispatcherServlet.java

/**
 * Stops and closes the application context created by this dispatcher servlet.
 *///from w ww .  j av  a  2s  .  co  m
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);
    }
}

From source file:org.openmrs.web.StaticDispatcherServlet.java

public void stopAndCloseApplicationContext() {
    try {//w  w  w .  j ava 2 s  .  co  m
        XmlWebApplicationContext ctx = (XmlWebApplicationContext) getWebApplicationContext();
        ctx.stop();
        ctx.close();
    } catch (Exception e) {
        log.error("Exception while stopping and closing static content dispatcher servlet context: ", e);
    }
}