Hi,

I wondered what the purpose of the 'end' method in a route is. I sort of expected it to be a terminator for dead-end routes. But that doesn't seem to be the case.

If I do something like this:

from("direct:start")
        .process(new Processor(){
                public void process(Exchange arg0) throws Exception {
                        System.out.println("hello!");
                }
        })
        .end();


I get the following exception:


java.lang.IllegalArgumentException: Root node with no active block
at org .apache.camel.model.ProcessorDefinition.end(ProcessorDefinition.java: 719)


I currently 'terminate' such a route by using a non-existent direct endpoint, which works but raises a WARN messages...

What is the preferred way to do this?

-P


Reply via email to