camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Bray <patrick.b...@gmail.com>
Subject RE: camel-quartz and support for quartz 2.x
Date Thu, 30 May 2013 06:43:16 GMT
Unfortunately simply overriding the quartz version will not work. 

The quartz class org.quartz.CronTrigger was changed to an interface in v2.x
and the QuartzComponent in camel-quartz is currently instantiating this: 

org.apache.camel.component.quartz.QuartzComponent

    protected CronTrigger createCronTrigger(String path) throws
ParseException {
        // replace + back to space so it's a cron expression
        path = path.replaceAll("\\+", " ");
        CronTrigger cron = new CronTrigger();
        cron.setCronExpression(path);
        return cron;
    }

I will check out the camel-quartz component source tonight and try modifying
this to use the new Quartz 2.x fluent builder API / DSL and see if that will
work i.e.:
	
    protected CronTrigger createCronTrigger(String path) throws
ParseException {
        // replace + back to space so it's a cron expression
        path = path.replaceAll("\\+", " ");
        return
TriggerBuilder.newTrigger().withSchedule(CronScheduleBuilder.cronSchedule(path)).build();
    }




--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5733452.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message