Resolving this demanded interacting with Quartz directly (so far working). I
have Spring starting the scheduler at application startup and some Services
allowing to reschedule jobs from Quartz API. Then the Quartz jobs just call
a Camel trigger job that sends a message to any dynamically passed endpoint:
<code>
public class CamelTriggerJob implements StatefulJob {
@Override
public void execute(JobExecutionContext context) throws
JobExecutionException {
CamelContext camelContext = (CamelContext)
ApplicationServletContextListener.getBean("camelContext");
ProducerTemplate template = camelContext.createProducerTemplate();
JobDataMap dataMap = context.getJobDetail().getJobDataMap();
String endPoint = dataMap.getString("endPoint");
template.sendBody(endPoint, "Activation from" +
this.getClass().getName());
}
}
</code>
Criticism to the solution is greatly appreciated of course.
Thanks for your help guys! Awesome support. BTW I will be writting a
beginner tutorial after my riding soon.
Best,
-Nestor
--
View this message in context:
http://camel.465427.n5.nabble.com/Configure-Camel-to-consume-externally-configured-quartz-jobs-tp5712732p5713361.html
Sent from the Camel - Users mailing list archive at Nabble.com.