[ 
https://issues.apache.org/jira/browse/KARAF-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645629#comment-13645629
 ] 

Lukas Roedl commented on KARAF-751:
-----------------------------------

Hi!

As recently discussed on the dev mailing list (see 
http://karaf.922171.n3.nabble.com/Task-scheduler-in-Karaf-td4028481.html) I now 
provide a patch which implements the Apache Sling Scheduler and adds Blueprint 
support to the sling implementation.

My initial problem was, that we needed some kind of scheduling support for our 
[HOMER software|http://dev.arcsmed.at/homer.core/trac/] running on top of Karaf.
After some searching I found the Apache Sling Scheduler and found out that it 
unfortunately only supports SCR and not Blueprint. So to use the Sling 
Scheduler implementation first the SCR feature has to be installed in Karaf.

In the provided patch I dropped the SCR support because otherwise the 
dependency it would be required by the bundle. Instead of the SCR annotations 
I've written a Blueprint configuration which instantiates the scheduler. I've 
also moved the interfaces "Job" and "Scheduler" from the org.apache.sling 
package to equivalent org.apache.karaf package and extended the interfaces a 
bit (necessary because of the shell command support).
Also I had to customize the QuartzScheduler class - where the implementation is 
done - because of the Blueprint support.

As a benefit I also implemented a shell command where all registered scheduler 
jobs can be listed. The command is functional but not completely ready yet...

                
> Provide a Timer Service in Karaf
> --------------------------------
>
>                 Key: KARAF-751
>                 URL: https://issues.apache.org/jira/browse/KARAF-751
>             Project: Karaf
>          Issue Type: New Feature
>          Components: karaf-osgi
>    Affects Versions: 3.0.0
>            Reporter: Ioannis Canellos
>            Assignee: Ioannis Canellos
>             Fix For: 3.1.0
>
>
> In many cases there is need to have recurring tasks run for a period of time.
> It would be great if Karaf provided some short of a TimerService that would 
> allow the user to easily schedule task execution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to