hi
this is my sample route builder code.the below code is executed successfully
and shows the output of xml content.

public class TestCamel extends RouteBuilder{
    public static void main(String[] args) throws Exception {           
        CamelContext context = new DefaultCamelContext();
        context.addRoutes(new TestCamel());
        context.start();
        Thread.sleep(3000);
        context.stop();
    }
        @Override
        public void configure() throws Exception {              
       
from("http://localhost:8080/servicemix_sample/resources/record/1345";).process(new
Processor()
         {                      
                   @SuppressWarnings("unchecked")
                   public void process(final Exchange exchange) throws
Exception {                            
                        String xmlvalue =
exchange.getIn().getBody(String.class);
                        System.out.println("Result-------"+xmlvalue);           
         
                        }
         });
        }
}

Problem:
 here i used REST webservice uri. while executing the program it will fetch
the uri and print the output of xml content more times in the client side
for the particular time period. when the thread.sleep time is increased it
will invoke the rest service more times. if i remove the  Thread.sleep(3000)
statement it cant write the result content. i want to get the XML output
content once. ie URI should call only one time.....

how to resolve this problem. 
is thr any other way to solve this?
kindly help me.
-- 
View this message in context: 
http://servicemix.396122.n5.nabble.com/Camel-Problem-with-Thread-sleep-tp3254572p3254572.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to