Which code ? Framework ? While searching on topic I found this http://ofbiz.markmail.org/search/?q=Semaphore#query:Semaphore%20list%3Aorg.apache.ofbiz.user+page:3+mid:ai2oszstroga6fpx+state:results
Jacques, How did u resolve that ? :-) Regards -- Chirag Manocha Emforium Pvt. Ltd. Contact :- +91-98735-47457, +91-98263-19099 Please don't print this Email unless you really need to - this will preserve trees on planet earth. ----- Original Message ----- > From: "Scott Gray" <scott.g...@hotwaxmedia.com> > To: user@ofbiz.apache.org > Sent: Thursday, June 17, 2010 3:11:44 PM > Subject: Re: Services semaphore attribute > There could be a bug in the code, the entity definition is correct > because an entry gets put in that table when a semaphore service is > begun and then removed when it completes. The presence of a record in > the entity is the indicator that the semaphore service is being run so > any subsequent calls need to wait. > > Obviously it shouldn't be trying to add another row for the same > service, it should instead be waiting until the row is removed so that > it can write a fresh row and begin the next service call in queue. > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > > On 17/06/2010, at 9:23 PM, Chirag Manocha wrote: > > > Thanks Jacques, Scott. > > > > I saw the entity ServiceSemaphore. Why the primary key of this > > entity is serviceName ? > > Like In my case when 10 requests come simultaneously, there is a > > service event in request. Now service needs to be called > > sequentially. Now when I use the semaphore attribute i.e. > > semaphore="wait", It gives exception:- > > Message: SQL Exception while executing the following:INSERT INTO > > public.SERVICE_SEMAPHORE (SERVICE_NAME, LOCK_THREAD, LOCK_TIME, > > LAST_UPDATED_STAMP, LAST_UPDATE > > D_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, > > ?, ?) (ERROR: duplicate key value violates unique constraint > > "pk_service_semaphore") > > > > > > Regards > > -- Chirag Manocha > > Emforium Pvt. Ltd. > > Contact :- +91-98735-47457, +91-98263-19099 > > Please don't print this Email unless you really need to - this will > > preserve trees on planet earth. > > > > ----- Original Message ----- > >> From: "Jacques Le Roux" <jacques.le.r...@les7arts.com> > >> To: user@ofbiz.apache.org > >> Sent: Thursday, June 17, 2010 1:25:34 PM > >> Subject: Re: Services semaphore attribute > > > >> Right, > >> https://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide > >> > >> Simply type semaphore in the search box Jacopo implemented in the > >> OFBiz main page > >> > >> Jacques > >> > >> Scott Gray wrote: > >>> I'm pretty sure I documented this as part of the service engine > >>> guide in confluence. I don't have a link handy. > >>> > >>> Regards > >>> Scott > >>> > >>> On 17/06/2010, at 7:30 PM, Jacques Le Roux wrote: > >>> > >>>> Hi Chirag, > >>>> > >>>> I think you are looking to use the wait value of the semaphore > >>>> attribute. Beware of the timeout though... > >>>> You may combine with the other semaphore attributes if needed > >>>> <xs:attribute name="semaphore-wait-seconds" type="xs:int" > >>>> default="300"/> <xs:attribute name="semaphore-sleep" > >>>> type="xs:int" default="500"/> > >>>> > >>>> HTH > >>>> > >>>> Jacques > >>>> Please use rather the user MLfor such questions, thanks... > >>>> ----- Original Message ----- > >>>> From: Chirag Manocha > >>>> To: jacques.le.r...@les7arts.com > >>>> Sent: Thursday, June 17, 2010 9:11 AM > >>>> Subject: Services semaphore attribute > >>>> > >>>> > >>>> Hi Jacques, > >>>> Can you please tell me about semaphore attribute of service tag. > >>>> > >>>> The scenario is when I am getting multiple request(request is > >>>> calling a service) then I want the service to be called in > >>>> sequence rather than parallel, > >>>> > >>>> If you can provide some links to documentation that will be help, > >>>> > >>>> Thanks and Regards > >>>> -- Chirag Manocha > >>>> +91-98735-47457