Package org.springframework.context.support

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


                           logger.debug("Running test ...");
                           if (checker != null)
                              checker.check(actx);
                           logger.debug("Done with test, stopping the application context ...");

                           actx.stop();
                           actx.destroy();

                           assertTrue(waitingForShutdown.waitForShutdownDoneLatch.await(baseTimeoutMillis, TimeUnit.MILLISECONDS));
                           assertTrue(waitingForShutdown.shutdown);
View Full Code Here


      assertNull(cluster);

      cluster = dempsy.getCluster(new ClusterId("test-app", "test-cluster4"));
      assertNull(cluster);

      actx.stop();
      actx.destroy();
   }

   @Test(expected=BeanCreationException.class)
   public void testInValidClusterStart() throws Throwable
View Full Code Here

            assertTrue(executor.isRunning());
         }
      }
      finally
      {
         try { actx.stop(); } catch (Throwable th) {}
         try { actx.destroy(); } catch(Throwable th) {}
      }
     
      assertNotNull(executor);
      assertTrue(!executor.isRunning());
View Full Code Here

      finally
      {
         TestAdaptor.throwExceptionOnSetDispatcher = false;
         if (actx != null)
         {
            actx.stop();
            actx.destroy();
         }
        
      }
     
View Full Code Here

         {
            logger.error("Interrupted . . . ", e);
         }
         finally
         {
            context.stop();
         }
        
         logger.info("Shut down dempsy appliction "+appCtxFilename+"-"+application + ", bye!");
      }
   }
View Full Code Here

         ClusterInfoSessionFactory factory = (ClusterInfoSessionFactory)actx.getBean("clusterSessionFactory");

         if (checker != null)
            checker.check("pass for:" + clusterManager,factory);

         actx.stop();
         actx.destroy();
      }
   }
     
   private static String getClusterLeaf(ClusterId cid, ClusterInfoSession session) throws ClusterInfoException
View Full Code Here

  @Test
  public void testJmxAdapterDemo() throws Exception{
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
        "/META-INF/spring/integration/JmxAdapterDemo-context.xml", JmxAdapterDemoTest.class);
    Thread.sleep(20000);
    context.stop();
  }

}
View Full Code Here

    ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext("META-INF/spring/integration/sequentialFileProcessing-config.xml");
    PollableChannel filesOutChannel = ac.getBean("filesOutChannel", PollableChannel.class);
    for (int i = 0; i < fileCount; i++) {
      logger.info("Finished processing " + filesOutChannel.receive(10000).getPayload());
    }
    ac.stop();
  }
  @Test
  public void testConcurrentFileProcessing() throws Exception {
    logger.info("\n\n#### Starting Concurrent processing test #### ");
    logger.info("Populating directory with files");
View Full Code Here

    ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext("/META-INF/spring/integration/concurrentFileProcessing-config.xml");
    PollableChannel filesOutChannel = ac.getBean("filesOutChannel", PollableChannel.class);
    for (int i = 0; i < fileCount; i++) {
      logger.info("Finished processing " + filesOutChannel.receive(10000).getPayload());
    }
    ac.stop();
  }
}
View Full Code Here

    ClassPathXmlApplicationContext context =
        new ClassPathXmlApplicationContext("mongodb-in-config.xml", MongoDbInboundAdapterDemo.class);

    Thread.sleep(3000);
    context.stop();
  }
}
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.