Removing and adding them again seems not working. I have defined the route builder as a spring bean and read some configuration parameters within the configure method. If I remove and add the route builder again, camel is somehow trying to start the previous routes from some magic cache. The thing is i'm using the same bean instance, but that bean should read the new configuration parameters from within the configure method. To my surprise camel is not even calling the configure method. It seems remove does not really remove the route builder from its collection. Any suggestions?
On Fri, Nov 13, 2015 at 10:31 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > Yeah a full redeploy is safer. But if you only want to redeploy one or > more routes. You would need to stop the route(s) then remove the > route(s) and then add them again to the running camel context. There > is API on CamelContext to do that from java code. > > On Fri, Nov 13, 2015 at 5:31 AM, Sashika <sashik...@gmail.com> wrote: > > Hi, > > I'm in need to load some camel route attributes like file paths etc from > the > > database and I'm initializing CamelContext from within spring. Also I use > > java > > DSL rather than XML DSL. I need camel to pickup the new values if I > change > > those > > in the database. > > 1. Do I have to restart the camel context in order for the new > attributes to > > take effect? > > 2. If so how to start/stop CamelContext from within a Spring web > application > > > > Any help is appreciated. > > Regards Sashika. > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >