I'm using the semaphore="wait" approach which is working well for my
implementation.

--
Vyom


On 4 August 2014 00:13, Youssef Khaye <y.kh...@unionsmarket.com> wrote:

> you may use service semaphore (with fail type) to achieve this.
> When the service is invoked it will create a kind of lock (an entry
> with the service name as a value in the semaphore table), if the lock
> already exists (because of old one still running), the new service will
> fails.
>
> hope this help.
>
> Le 03/08/2014 18:14, Vyom Jain a écrit :
>
>  Hello Everyone,
>>
>> I've a requirement to process a custom table which is populated by an
>> external application. It is required that entries are processed as fast as
>> possible.
>> To achieve this a service has been written which is scheduled to execute
>> every 5 seconds (done via changing configuration in serviceengine.xml &
>> temporal expressions).
>>
>> While this approach works well, I've noticed that at times multiple
>> instances of service getting scheduled, this probably happens because the
>> service that was initially scheduled took longer than 5 seconds to
>> complete. Is there a way I can ensure only 1 instance of the service is
>> active at any given point in time?
>>
>> Can anyone suggest a better approach in which job scheduler isn't
>> involved?
>>
>> I'm using a heavily customized version of OFBiz which is somewhere between
>> v09.04 & 10.04 and doesn't have the advantages of job scheduler fixes
>> added
>> in later versions.
>>
>> --
>> Vyom
>>
>>
>

Reply via email to