camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfred Hiebl <a.hi...@mic-cust.com>
Subject Re: Route with choice and split
Date Tue, 10 May 2011 07:27:02 GMT
Hi,

I saw that this topic has been discussed several times before and realize
that the Java has its limitations there. We are facing the same problem with
split() in combination with doTry/doCatch(). 

Could you also add a method "endDoTry()" to the ProcessorDefinition? My use
case is this:

  @Override
  public void configure() throws Exception {
        from("timer://myTimer?period=10000)
                .log("begin")
                .setBody(constant("x,y,z"))
                .doTry()
                        .log("processing")
                        .split(body())
                                .log("split")
                        .end()
                .endDoTry()  // would need some way like this to get back to
the TryDefinition
                .doCatch(Exception.class)
                        .log("Exception")
                .end();
  }

I tested this by adding endDoTry() to the ProcessorDefinition, and it works
just fine.

  public TryDefinition endDoTry() {
       return (TryDefinition) this;
  }

An endDoCatch in the TryDefinition would be great too. Is it possible that
these endXXX() methods get added to 2.6.0, not just 2.7.0 or trunk? 

Best regards,
Alfred 

PS: I added the same post to the camel-dev group, but had some issues with
Nabble. See
http://camel.465427.n5.nabble.com/DISCUSS-Java-DSL-caveat-with-the-Content-Based-Router-td3389083.html#a4342886


--
View this message in context: http://camel.465427.n5.nabble.com/Route-with-choice-and-split-tp4375184p4383863.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message