Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext


  
   @SuppressWarnings("unchecked")
   public void setUp(String failFast) throws Exception
   {
      System.setProperty("failFast", failFast);
      context = new ClassPathXmlApplicationContext("TestMPContainer.xml");
      container = (MpContainer)context.getBean("container");
      assertNotNull(container.getSerializer());
      inputQueue = (BlockingQueue<Object>)context.getBean("inputQueue");
      outputQueue = (BlockingQueue<Object>)context.getBean("outputQueue");
   }
View Full Code Here


  
   private <T,N> void runAllCombinations(Checker checker) throws Throwable
   {
      for (String clusterManager : clusterManagers)
      {
         ClassPathXmlApplicationContext actx = new ClassPathXmlApplicationContext(clusterManager);
         actx.registerShutdownHook();

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

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

         actx.stop();
         actx.destroy();
      }
   }
View Full Code Here

  private final static String loading = "config-loading.xml";

  @SuppressWarnings("resource")
  public static void main(String[] args) throws Exception {
    new ClassPathXmlApplicationContext(prefix + dir + File.separatorChar + loading).getBean(ChainedServer.class).start();
  }
View Full Code Here

  /**
   * @param args
   */
  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/http-outbound-config.xml");
    RequestGateway requestGateway = context.getBean("requestGateway", RequestGateway.class);
    String reply = requestGateway.echo("Hello")
    logger.info("Replied with: " + reply);
  }
View Full Code Here

                  + "\n    http://www.springsource.org/spring-integration       "
                  + NEWLINE
                  + LINE );

        final AbstractApplicationContext context =
                new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");

        context.registerShutdownHook();

        final Scanner scanner = new Scanner(System.in);

        final CoffeeService service = context.getBean(CoffeeService.class);

        LOGGER.info(LINE
                  + NEWLINE
                  + "\n    Please press 'q + Enter' to quit the application.    "
                  + NEWLINE
View Full Code Here

public class CoffeeServiceFindAllTest {

    @Test
    public void testFindCoffee() {
        final ApplicationContext context
            = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
                                                  CoffeeServiceFindAllTest.class);

        final CoffeeService service = context.getBean(CoffeeService.class);

        List<CoffeeBeverage> coffeeBeverages = service.findAllCoffeeBeverages();

        assertTrue(coffeeBeverages.size() == 4);
View Full Code Here

public class CoffeeServiceFindCoffeeTest {

    @Test
    public void testFindCoffee() {
        final ApplicationContext context
            = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
                                                  CoffeeServiceFindCoffeeTest.class);

        final CoffeeService service = context.getBean(CoffeeService.class);

        String description = service.findCoffeeBeverage(3);

        assertEquals("Mmmmh, chocolate.", description);
View Full Code Here

public class CoffeeServiceStartupTest {

    @Test
    public void testStartupOfSpringInegrationContext() throws Exception{
        final ApplicationContext context
            = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
                                                  CoffeeServiceStartupTest.class);
        Thread.sleep(2000);
    }
View Full Code Here

public class JmsRouteTest extends CamelSpringTestSupport {

    @Override
    protected AbstractApplicationContext createApplicationContext() {
        // must create application context with refrehs = false when using active profiles
        return new ClassPathXmlApplicationContext(new String[]{"org/apache/camel/itest/spring40/JmsRouteTest.xml"}, false);
    }
View Full Code Here

*/
public class CafeDemoAppBaristaHotActiveMQ {


  public static void main(String[] args) throws InterruptedException, IOException {
    AbstractApplicationContext context = new ClassPathXmlApplicationContext(
        "/META-INF/spring/integration/activemq/cafeDemo-amq-config.xml",
        "/META-INF/spring/integration/activemq/cafeDemo-amq-baristaHot-xml.xml");

    System.out.println("Press Enter/Return to exit");
    System.in.read();
    context.close();
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.support.ClassPathXmlApplicationContext

Copyright © 2018 www.massapicom. 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.