Re: Scheduled Actions
Re: Scheduled Actions
- Subject: Re: Scheduled Actions
- From: Philippe Rabier <email@hidden>
- Date: Thu, 31 Mar 2011 17:17:42 +0200
On 31 mars 2011, at 14:06, Alexis Tual wrote:
> Bonjour Philippe,
Bonjour Alexis (did you recognize my accent? ;-))
> That's interesting, we've done something similar but very specific to our ERP (several apps - one BDD) :
> - modeling and persisting of scheduled actions with our own eomodel
> - scheduling with quartz : one scheduler with RAMJobStore for an entire app, that's a limitation due to our architecture
>
> How did you handle quartz scheduler with WO multi-instances ?
> If your persist your own scheduled actions in db, 1 scheduler with RAMJobStore per webapp instance may lead to jobs triggered twice or more if you haven't thought about it :
> - when starting instances, you should split the scheduling of existing actions among instances
> or
> - only 1 webapp instance has a scheduler and schedules actions at regular intervals
> or
> - you use JDBCJobstore and quartz clustering that should garantee the unique scheduling, but then you may face other "problems" (like having to create quartz tables for each application)
You're right. Only one instance must run the jobs scheduler. Or you must implement a process that dispatches job among the different schedulers.
We used to base our developments on ERXFrameworkPrincipal class that is very powerful because we have no dependencies with the different parts of the web application. The scheduler is in its own framework and we can play with it as if we played Lego.
So you can create a dedicated app or add scheduling to another app with no code at the application level. Your choice.
To launch or not the scheduler, we just need to set a property to true or false. So several instances can run but only one will run the scheduler.
Hope this help you.
Regards,
Philippe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden