camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <>
Subject RE: Clustered Quartz
Date Tue, 21 Oct 2008 09:03:12 GMT
Created and attached
a draft patch.

----- Original message -----
From: "Claus Ibsen" <>
Date: Mon, 20 Oct 2008 14:03:21 +0200
Subject: RE: Clustered Quartz


Why not use the name StatefulCamelJob as Quartz uses Stateful for this
kind of name?

Yes we love contributions as you know so please create a ticket for this
great feature.

Yeah the endpoint etc. is not serializable but the endpoint URI is, so
it could be persisted and used to lookup the endpoint upon retrieval.
>From the camel context you can lookup endpoints by its uri.

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: Martin Gilday [] 
Sent: 20. oktober 2008 13:53
Subject: Clustered Quartz

Hi riders,

Has anyone attempted to use the Quartz component in a "clustered" Quartz
setup i.e with a JDBC job store?  

I am looking at a situation where I would have items placed in a DB
table and I would like to do the following:
from quartz to jdbc to processor to jms to processor

However my Camel routes will be running on more than one machine.  As
the processing of the JDBC result can on some occasions take longer than
the trigger length the trigger should not fire if the job is still
running.  This works easily in our non-Camel Spring and Quartz setup. 
All you need is a and a shared JDBC job store.

I have looked at the camel-quartz source and I do not think what I am
after is currently possible.  As CamelJob implements Job and not
StatefulJob then it is impossible to create a blocking job.  The other
issue is that the endpoint is placed into the JobDataMap, which I think
may not be compatible with the JDBC job store (I don't think the
endpoint would serialise).

I think we could update the component with a parameter such as
"blocking"; create a subclass of CamelJob called BlockingCamelJob which
implements StatefulJob (the implementation need not change as it is only
a marker interface); if blocking=true then create a BlockingCamelJob
instead of CamelJob.  The only remaining problem would be whether the
JobDataMap would persist.

Can anyone think of an easy alternative to this that would achieve what
I am after?


View raw message