Package org.springframework.context.support

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


        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
        app.close();
        app2.close();
    }
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

        // 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

            new ClassPathXmlApplicationContext(new String[]{"/META-INF/spring/camelContext.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

        String response = test.execute( soapMessage,
                                        (CamelContext) springContext.getBean( "camel-client-ctx" ) );

        assertTrue( response.contains( "execution-results" ) );
        assertTrue( response.contains( "echo" ) );
        springContext.stop();
    }

}
View Full Code Here

        String response = test.execute( cmd,
                                        (CamelContext) springContext.getBean( "camel-client-ctx" ) );

        assertTrue( response.contains( "execution-results" ) );
        assertTrue( response.contains( "echo" ) );
        springContext.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.