Example usage for org.springframework.context.support FileSystemXmlApplicationContext stop

List of usage examples for org.springframework.context.support FileSystemXmlApplicationContext stop

Introduction

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

Prototype

@Override
    public void stop() 

Source Link

Usage

From source file:org.jaffre.springframework.JaffreExporterTestCase.java

public void test() throws Exception {
    final File l_fileAppContext;
    final FileSystemXmlApplicationContext l_appCtx;

    l_fileAppContext = PackageFile.get("test-resources/appcontext01.xml");
    assertTrue(l_fileAppContext.isFile());

    l_appCtx = new FileSystemXmlApplicationContext(l_fileAppContext.getPath());

    l_appCtx.start();//from   w  w w. j  a  va2s  .co  m

    assertEquals(6, l_appCtx.getBeanDefinitionCount());
    assertNotNull(l_appCtx.getBean("jaffreClient"));
    assertNotNull(l_appCtx.getBean("jaffreServer"));
    assertNotNull(l_appCtx.getBean("jaffreConnector"));
    assertNotNull(l_appCtx.getBean("jaffreExporter"));
    assertNotNull(l_appCtx.getBean("throwException"));
    assertNotNull(l_appCtx.getBean("greeting"));

    l_appCtx.stop();
    l_appCtx.close();
}