camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ManishGupta <>
Subject Re: Junit Test Failing with AdviceWith
Date Wed, 17 Dec 2014 13:00:07 GMT
Thanks for the help claus :) I read through the Javadocs and understood that
start method is non blocking. If i have to use in a standalone application i
have to use main function provided by camel.

I inturn used the ProducerTemplate to keep the camelContext in running state
with following code.

public class AMSTest extends CamelSpringTestSupport{ 

        protected AbstractApplicationContext createApplicationContext() { 
                return new ClassPathXmlApplicationContext( 
    public boolean isUseAdviceWith() { 
        return true; 

        public void testLAMS() throws Exception 
context.getRouteDefinition("compare-request").adviceWith(context, new
AdviceWithRouteBuilder() { 
                public void configure() throws Exception { 



I bumped in to another issue from my actual code i had


if i want to use the same replace statement from my original code i.e.


I am unable to use the ProducerTemplate for the same 

InputStream f = getClass().getResourceAsStream("LOADTRIGGER");


Can you please help me with this ?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message