Re: Enable/disable Intercept strategy at runtime
This is a goal in Camel 3.0 to allow dynamic interceptors to be added/removed at runtime. On Mon, Aug 12, 2013 at 4:10 PM, bpinto brianpin...@hotmail.com wrote: HI, I am looking for a way to add interceptstrategy to a camel context during runtime after the camel context has started. Similarly,I would also want to disable the respective interceptstrategy while the camel context continues to run. 1. Can this be done ? If yes how do I go about it? I have looked into camelcontext.addInterceptstrategy and camelcontext.getInterceptStrategies().remove() and restarted the routes, but it doesnt seem to take effect. The requirement is mainly to be able to add plugin behaviour on demand. Any pointers would be helpful. Thanks, Brian -- View this message in context: http://camel.465427.n5.nabble.com/Enable-disable-Intercept-strategy-at-runtime-tp5737154.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Enable/disable Intercept strategy at runtime
Thanks Claus, With the current version though, is it achievable only through camelcontext restarts? Thanks, Brian -- View this message in context: http://camel.465427.n5.nabble.com/Enable-disable-Intercept-strategy-at-runtime-tp5737154p5737160.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Enable/disable Intercept strategy at runtime
Yeah you would need to implement your own interceptor that is capable of enabling / disabling other interceptors at runtime, if you want dynamic behavior without camel context restarts. Also there is a new Container SPI in 2.12 org.apache.camel.spi.Container Which can be used in containers such as ServiceMix / Karaf to add this interceptor in all camel apps so you dont have to add that to each camel app individually. Though the true dynamic behavior is a goal of 3.0. On Mon, Aug 12, 2013 at 4:37 PM, bpinto brianpin...@hotmail.com wrote: Thanks Claus, With the current version though, is it achievable only through camelcontext restarts? Thanks, Brian -- View this message in context: http://camel.465427.n5.nabble.com/Enable-disable-Intercept-strategy-at-runtime-tp5737154p5737160.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Enable/disable Intercept strategy at runtime
Thanks Claus that was helpful. Beats having to restart the context. -- View this message in context: http://camel.465427.n5.nabble.com/Enable-disable-Intercept-strategy-at-runtime-tp5737154p5737178.html Sent from the Camel - Users mailing list archive at Nabble.com.