Package org.springframework.context.support

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


            public void start() throws Exception {
                applicationContext.start();
            }

            public void stop() throws Exception {
                applicationContext.stop();
            }
        });

        return SpringCamelContext.springCamelContext(applicationContext);
    }
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 {
View Full Code Here

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

        // stop and exit the client
        producer.stop();
        context.stop();
       
    }
   
    @Test
    public void testCamelRemotingInvocation() {
View Full Code Here

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

}
View Full Code Here

            new ClassPathXmlApplicationContext(new String[]{"/META-INF/spring/queueCamelContext.xml"});
        CamelContext camelContext = (CamelContext)applicationContext.getBean("camelContext");
        assertNotNull("The camel context should not be null", camelContext);
        Thread.sleep(2000);       
        camelContext.stop();
        applicationContext.stop();       
    }

}
View Full Code Here

            public void start() throws Exception {
                applicationContext.start();
            }

            public void stop() throws Exception {
                applicationContext.stop();
            }
        });

        return SpringCamelContext.springCamelContext(applicationContext);
    }
View Full Code Here

            public void start() throws Exception {
                applicationContext.start();
            }

            public void stop() throws Exception {
                applicationContext.stop();
            }
        });

        return SpringCamelContext.springCamelContext(applicationContext);
    }
View Full Code Here

        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
        mock.expectedMinimumMessageCount(2);

        mock.assertIsSatisfied();

        app.stop();
       
        log.info("Restarting ...");
        log.info("Restarting ...");
        log.info("Restarting ...");
View Full Code Here

        MockEndpoint mock2 = camel2.getEndpoint("mock:result", MockEndpoint.class);
        mock2.expectedMinimumMessageCount(2);

        mock2.assertIsSatisfied();

        app2.stop();

        // we're done so let's properly close the application contexts, but close
        // the second app before the first one so that the quartz scheduler running
        // inside it can be properly shutdown
        IOHelper.close(app2, app);
View Full Code Here

        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
        mock.expectedMinimumMessageCount(2);

        mock.assertIsSatisfied();

        app.stop();
       
        log.info("Restarting ...");
        log.info("Restarting ...");
        log.info("Restarting ...");
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.