camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adie <>
Subject CamelConfiguration helper class vs restConfiguration()
Date Mon, 29 May 2017 16:22:06 GMT
  I am using org.apache.camel.spring.javaconfig.CamelConfiguration to
bootstrap my application. Generally it works fine, but if I am using
restConfiguration() then it gives me some issues:

I've tried with Camel 2.17 and 2.19 with Jetty9 endpoint.

If I have two route builders, I can use the restConfiguration() inside to
setup rest dsl and then use rest().. fluent builders later. Unfortunately
even if restConfiguration() seems to be updating settings on a RouteBuilder
only, it also affects all other RouteBuilders that are returned by

As an example, I have a problem with some endpoint properties: 

A) If I have two route builders with two route configurations the one that
is later on the list will override restConfiguration() with its settings.
For example, it will clear security handlers.

B) If you setup security handler on one route, it will be also respected for
the other route.

If endpoints are shared between route builders it is quite inconvenient that
you can set it up inside one route builder and it propagates to all others
that do not reference it, but are by chance loaded together.

Best Regards,

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message