Pardon me for piping in (I know just enough to be dangerous ;), but was there any reinventing of the wheel in your commit, Ioannis, that could be avoided by closer integration with the Quartz Scheduler (already Apache-licensed and famous: http://www.quartz-scheduler.org/)--not just the "advanced" stuff that JB is mentioning in #3 below? Using Quartz as much as possible might also mean Karaf users can rely on Quartz' documentation for scheduling instead of potentially needing to learn two sets of scheduling rules.

Glen

On 07/20/2011 08:48 AM, Jean-Baptiste Onofré wrote:
Hi Ioannis,

It's a really good idea (we discussed of that for Cellar :)).

It could be very helpful for a large set of requirements.

I wonder:
1/ should it be a standard feature or an optional one (I think standard
is better as it doesn't require any resource if not used. It could be
comparable to the Scheduler that we find in an Oracle database).
2/ as for security/encryption (which use a simple encryption class or
Jasypt), maybe it could be interesting a use a simple scheduler (just a
Java Timer) and provide an optional feature to provide advanced
scheduling (cron, etc) which can be powered by Quartz
3/ add commands and console pages is a requirement. We can imagine
projects that could use Karaf as an enterprise scheduler (with team
escalation, etc).

Thanks
Regards
JB

On 07/20/2011 02:38 PM, Ioannis Canellos wrote:
Hi,

I added a new module to Karaf. The purpose of this module is to provide
means for scheduling tasks through the osgi service registry.

The scheduler module registers a ServiceListener that listens for services
of the java.lang.Runnable interface that also have 2 service properties that
are required for scheduling:

a) org.apache.karaf.scheduler.task.id (A string identifier for the task that
is going to be scheduled).
b) org.apache.karaf.scheduler.task.period (A long number that indicates the
execution period in milliseconds).

Please note that all Runnable that don't have both properties will be
ignored. All other will be scheduled for execution via java Timer.

I also plan to add shell commands for listing, rescheduling
&   canceling events. It might be a goog idea to also add properties for
supporting cron expression etc.

You can find the initial commit in the trunk.

wdyt?


--
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza


Reply via email to