Create an abstract RouteBuilder implementation, put your onException there and have all your RouteBuilder classes extend from this one.
Elvio -----Original Message----- From: Andrei Stoica [mailto:[email protected]] Sent: 19 September 2014 14:25 To: [email protected] Subject: Reuse onException handler Hello, I have the following route: onException(ConnectException.class) .handled(true) .process(new GlobalExceptionProcessor()) .to("jms:topic:responseTopic"); from("jms:mongoQueue?concurrentConsumers=20&asyncConsumer=true") .dynamicRouter(method(MongoConnection.class, "getConnection")) .to("jms:topic:responseTopic"); I want to reuse the onException declaration on many other routes defined in other classes. How can I do this without copy-pasting the declaration over and over again? Can I somehow move the onException in a bean? -- View this message in context: http://camel.465427.n5.nabble.com/Reuse-onException-handler-tp5756746.html Sent from the Camel - Users mailing list archive at Nabble.com.
