Package org.springframework.context.support

Examples of org.springframework.context.support.FileSystemXmlApplicationContext.stop()


    if (factory.containsSingleton(name)) {
      log.debug("Context found in parent, destroying: {}", name);
      FileSystemXmlApplicationContext ctx = (FileSystemXmlApplicationContext) factory.getSingleton(name);
      if (ctx.isRunning()) {
        log.debug("Context was running, attempting to stop");
        ctx.stop();
      }
      if (ctx.isActive()) {
        log.debug("Context is active, attempting to close");
        ctx.close();
      } else {
View Full Code Here


    // add a shutdown hook to close spring context
    Runtime.getRuntime().addShutdownHook(new Thread() {
      public void run() {
        log.info("stopping spring context ... ");
        springContext.stop();
        springContext.close();
        log.info("<< spring context stopped >>");
      }
    });
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.