|| at Mar 22, 2013 at 6:56 am
On Thu, Mar 21, 2013 at 2:20 PM, sushil_vsk5 wrote:
I have been able to successfully suspend and resume routes using the
relevant JMX operations. However, when the container [app server] is
restarted, the routes again start up which I do not want. I want that
whatever routes have been suspended should remain so even after server
restarts till the time I explicitly resume them again. Is it possible to
implement this somehow?
I guess setting autoStartup false on camel context.
And use an event listener, and listen when camel has been started.
And then load from a persisten store the data that tells you which
routes to start.
Then start them using the api on CamelContext.
And the even listener allows you to keep track when a route is stopped
also. Then you can update
your persisten store to reflect that change.
A little example about the event notifier is herehttp://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html
And the even objects we have is in this packagehttp://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/event/package-summary.html