On Thu, Sep 13, 2012 at 2:21 PM, shindito <[email protected]> wrote: > Hello, > > I'm using the JMS Component to create a JMS application which have to types > of toutes: > 1) from vm IM endpoints to JMS topics. > 2) from JMS topics to user processors. > The JMS Component uses JNDI for topic/connection factory resolution. And I > want to change the physical data of this component -the provider url in > order to use a different machine as the JMS Provider. > > My question is: how should I switch/update the component, in order to have > the change reflected by all already existing routes which are using this > component? > > Is it going to work like this: > camelContext.stop(); > camelContext.removeComponent(componentName); //remove old component > camelContext.addComponent(componentName, newComponent); > camelContext.start() >
Yeah you would also need to stop/shutdown the component you remove, to ensure its resources are cleaned up. Some components may support updates for some of their options. I would assume the JMS does a bit of that. So you may just shutdown all the routes. and then change the options on the jms component. And start the routes again. > If not, what is the "Camel"-like approach to have this component > configuration change reflected in all routes? > > Thanks for your help! > > Best regards, > Atanas > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-does-a-Camel-component-update-change-existing-routes-tp5719275.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
