Ayan
Ayan

Reputation: 545

Injecting or Inheriting Router Builder for global onException in apache camel

I have onException configured in one DefaultRouteBuilder class. I want this onException in all other routes in my context. My doubt is whether I should inherit DefaultRouteBuilder in all other routes and calling super.configure() in configure() method or to inject DefaultRouteBuilder defaultRoute in all other RouteBuilder classes and calling defaultRoute.configure() in configure() method. Which one should be appropriate?

Upvotes: 0

Views: 482

Answers (1)

Willem Jiang
Willem Jiang

Reputation: 3291

The global onException DSL only work inside of same RouteBuilder, as camelcontext treat the routebuilder instance separately.

Upvotes: 1

Related Questions