Package org.springframework.context.support

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


    LifecycleListener listener = (LifecycleListener) context.getBean("listener");
    assertFalse(lifecycleBean.isRunning());
    context.start();
    assertTrue(lifecycleBean.isRunning());
    assertEquals(0, listener.getStoppedCount());   
    context.stop();
    assertFalse(lifecycleBean.isRunning());
    assertEquals(1, listener.getStoppedCount());
    assertSame(context, listener.getApplicationContext());
  }
View Full Code Here


    LifecycleListener listener = (LifecycleListener) context.getBean("listener");
    assertFalse(lifecycleBean.isRunning());
    context.start();
    assertTrue(lifecycleBean.isRunning());
    assertEquals(0, listener.getStoppedCount());
    context.stop();
    assertFalse(lifecycleBean.isRunning());
    assertEquals(1, listener.getStoppedCount());
    assertSame(context, listener.getApplicationContext());
  }
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.