I've written a Quartz plugin for Synapse, which allows Quartz Jobs to
be run by Quartz in the context of Synapse. In particular, they have
access to the SynapseEnvironment, so that they can inject messages
into Synapse.
However, the Quartz model isn't quite as simple as the Synapse model
(in my opinion).
Basically Quartz Jobs implement a method
public void execute(JobExecutionContext arg0) throws JobExecutionException
And from the JobExecutionContext they get any properties they need.
The jobs can be specified either programmatically or using Quartz XML
syntax, but the Quartz syntax is a bit "heavy". For example in synapse
we set a property this way:
<property name="address" value="urn:gmond"/>
In Quartz its like this:
<quartz:entry>
<quartz:key>port</quartz:key>
<quartz:value>8649</quartz:value>
</quartz:entry>
Since I've already coded support for the Quartz model, I suggest we
keep that as one approach, but I think we could make life much simpler
for users:
Here is a proposed XML:
<job class="org.my.synapse.job">
<property name="stringProp" value="String"/>
<property name="xmlProp">
<somexml>config</somexml>
</property>
<simpletrigger count="-1" interval="1000"/>
<crontrigger expression="0 * 1 * * ?"/>
</job>
We will use Quartz under the covers to call our own job handling code,
which can use injection to inject the properties into the Job instance
and then call execute(); on the Job.
This basically makes it simpler to write AND configure a job.
Paul
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]