Package org.springframework.context.support

Examples of org.springframework.context.support.AbstractApplicationContext.destroy()


  public void destroyLazyInitSchedulerWithDefaultShutdownOrderDoesNotHang() {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext("quartzSchedulerLifecycleTests.xml", this.getClass());
    assertNotNull(context.getBean("lazyInitSchedulerWithDefaultShutdownOrder"));
    StopWatch sw = new StopWatch();
    sw.start("lazyScheduler");
    context.destroy();
    sw.stop();
    assertTrue("Quartz Scheduler with lazy-init is hanging on destruction: " +
        sw.getTotalTimeMillis(), sw.getTotalTimeMillis() < 500);
  }
View Full Code Here


  public void destroyLazyInitSchedulerWithCustomShutdownOrderDoesNotHang() {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext("quartzSchedulerLifecycleTests.xml", this.getClass());
    assertNotNull(context.getBean("lazyInitSchedulerWithCustomShutdownOrder"));
    StopWatch sw = new StopWatch();
    sw.start("lazyScheduler");
    context.destroy();
    sw.stop();
    assertTrue("Quartz Scheduler with lazy-init is hanging on destruction: " +
        sw.getTotalTimeMillis(), sw.getTotalTimeMillis() < 500);
  }
View Full Code Here

          if ( applicationContext != null ) {
            LOG.debug( "Destroying ApplicationContext for module {}", module.getName() );

            module.shutdown();
            applicationContext.destroy();
          }
        }
      }

      // Destroy the root ApplicationContext
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.