AdviceWith can only be used for unit test. The problem that the customer would like to solve is the following : Customer has developed some classes that the project will use to develop Camel routes. These classes are abstract RouteBuilder class where strategies have been developed to handle functional, technical Exception but also transaction behavior. Advantage is that the developer does not need to add .transacted in their routes.
On Tue, Oct 1, 2013 at 9:18 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Use advice-with if you wanna "mess around" with routes. > > > On Fri, Sep 27, 2013 at 5:05 PM, Charles Moulliard <ch0...@gmail.com> > wrote: > > Hi, > > > > Since Camel 2.12, the following syntax is not longer tolerated/accepted. > Is > > there a workaround .... > > > > public void testInvalidTransactedInterceptFrom() throws Exception { > > try { > > context.addRoutes(new RouteBuilder() { > > @Override > > public void configure() throws Exception { > > > > interceptFrom().transacted(); > > > > from("direct:start") > > .split(body()) > > .to("mock:split") > > .end(); > > } > > }); > > fail("Should fail"); > > } catch (IllegalArgumentException e) { > > assertTrue(e.getMessage().startsWith("The output must be > added > > as top-level on the route.")); > > } > > } > > > > Regards, > > > > -- > > Charles Moulliard > > Apache Committer / Architect @RedHat > > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cib...@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com