I have a webscript for which i don't want multiple calls at same time. If i get multiple calls at same time, i want to execute the webscript one after the other. Can we do that? If yes please explain the process.
Thanks in advance!
I have a webscript for which i don't want multiple calls at same time. If i get multiple calls at same time, i want to execute the webscript one after the other. Can we do that? If yes please explain the process.
Thanks in advance!
Use the requiresnew in your webscript definition at first. This will make sure that every call is in it's own transaction and you won't get issues with rollingback etc.
In most cases this will solve all the issues you'll have. If not then you're probably fixing the problem at the wrong side and you'll need a queue before Alfresco like ActiveMQ.
You can call a method with the synchronize annotation in the webscript's executeImp