2

I am using camel 2.9.0 in my project. We have a number of routes divided into different camel contexts. Each camel context is bundled separately and deployed in Apache Karaf. Now the problem is divied into 2 parts:

1.) Each route is a scheduled route. Although using Quartz component, we are able to define a cron expressio in each route, we want a console where in we can trigger,stop any route and also put a cron expression to any route.(Scheduling a route through a web console is our main objective).

2.) Also we tried to configure the cron expression for each route through quartz.property. But if someone wants to change the cron expression at runtime in Apache Karaf, then we have to stop the bundle deployed and start in again. What can be done to change the value of cron expression at runtime.

Any replies and help would be appreciable.

Piyush

piyushGoyal
  • 1,079
  • 1
  • 11
  • 26
  • Maybe JMX wil help you? Karaf and Camel have a large set of MBeans. See http://karaf.apache.org/manual/latest-2.2.x/users-guide/jmx.html and http://camel.apache.org/camel-jmx.html – Konstantin V. Salikhov Oct 11 '12 at 08:17

1 Answers1

3

JMX provides remote context/route management support (start, stop, etc)

see these posts for more information:

otherwise, to add/remove/alter routes at runtime, you'd need to get a handle to the CamelContext and leverage its APIs (addRoute(), removeRoute(), etc)

see these for more information:

Community
  • 1
  • 1
Ben ODay
  • 20,784
  • 9
  • 45
  • 68
  • What about scheduling a route using cron expression through a console? – piyushGoyal Oct 12 '12 at 08:39
  • 1
    this doesn't exist, but your app could expose camel-http routes that dynamically adds new routes (camel-quartz, etc) or removes existing ones via HTTP requests... – Ben ODay Oct 12 '12 at 15:31