While I think this is very valuable, my first impression is that scheduling
at the bundle level is not necesseraly a good idea.
I would think this would be more suitable to do that at the camel route
level.
The CamelContext has features to start / stop routes already, so it should
be quite easy to implement a scheduler on top of that.

For bundles, it can be valuable too, but the problem is that bundles can be
started asynchronously (when using spring-dm or blueprint) so having some
kind of return value would be quite difficult.
Actually, you could use camel itself to implement the scheduler and start /
stop other routes or bundles ?  It could also handle a timeout I think and
send alerts ... Camel is quite powerful, so it sounds reasonable to use it.

Thoughts ?

On Thu, Aug 27, 2009 at 09:45, Charles Moulliard <[email protected]>wrote:

> Hi,
>
> Since a couple of days I try to find an easy way to handle "jobs" in Apache
> Felix Karaf and Camel. In standard, Camel proposes a camel-timer and
> camel-quartz components but they can only be used inside a camel route. By
> the way, camel context or camel routes are not "schedulable" like it is
> possible with Spring batch. So it is not possible to start a route at 9:00
> and stop it at 11:00 and to check if the route succeed or fails inside a
> OSGI server. OF course, if camel is packaged in java standalone application
> or j2EE server, alternative exist.
>
> This is why I come with the following idea who could be very interesting
> for Apache Felix Karaf in term of enterprise added value.
>
> *Job Scheduler for starting and stopping bundles*
>
> With the help of a quartz configuration file, the kernel of Apache Felix
> Karaf can check which bundles have to be scheduled (like jobs) and
> started/stopped. The bundle to be started could be a camel route, .... When
> the bundle stops or if the thread is still running at the end of the job,
> this information must be returned to the job scheduler in order to decide
> what to do (wait and send an alert to administrator to decide what to do).
> Another interesting feature could be to return fail / succeed to the job
> scheduler to keep trace of what happen during job execution. This
> information could be also used to link jobs / bundles together as this is a
> feature that you have with tool like IBM Tivoli Manager where you can chain
> jobs.
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to