ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Youssef Khaye <y.kh...@unionsmarket.com>
Subject Re: Processing entries in custom table
Date Sun, 03 Aug 2014 18:43:10 GMT
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
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message