Package org.springframework.context

Examples of org.springframework.context.ConfigurableApplicationContext.stop()


    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

        // as opposed to the CamelClientRemoting example we need to define the service URI in this java code
        int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut, 22);
       
        assertEquals("Get a wrong response", 66, response);
       
        context.stop();
    }
   
    @Test
    public void testCamelEndpointInvocation() throws Exception {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml");
View Full Code Here

       
        assertEquals("Get a wrong response.", 33, response);

        // stop and exit the client
        producer.stop();
        context.stop();
    }
   
    @Test
    public void testCamelRemotingInvocation() {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client-remoting.xml");
View Full Code Here

      
        int response = multiplier.multiply(33);
       
        assertEquals("Get a wrong response", 99, response);
       
        context.stop();
    }

}
View Full Code Here

        // as opposed to the CamelClientRemoting example we need to define the service URI in this java code
        int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut, 22);
       
        assertEquals("Get a wrong response", 66, response);
       
        context.stop();
       
    }
   
    protected void camelEndpointInvocation() throws Exception {
       
View Full Code Here

       
        assertEquals("Get a wrong response.", 33, response);

        // stop and exit the client
        producer.stop();
        context.stop();
       
    }
   
    protected void camelRemotingInvocation() {
View Full Code Here

      
        int response = multiplier.multiply(33);
       
        assertEquals("Get a wrong response", 99, response);
       
        context.stop();
       
    }

}
View Full Code Here

        // as opposed to the CamelClientRemoting example we need to define the service URI in this java code
        int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut, 22);
       
        assertEquals("Get a wrong response", 66, response);
       
        context.stop();
    }
   
    @Test
    public void testCamelEndpointInvocation() throws Exception {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml");
View Full Code Here

       
        assertEquals("Get a wrong response.", 33, response);

        // stop and exit the client
        producer.stop();
        context.stop();
    }
   
    @Test
    public void testCamelRemotingInvocation() {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client-remoting.xml");
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.