Thanks for the explanation Jacopo, I will review (and test) to learn how to use the
"Executor" framework.
Jacques
From: "Jacopo Cappellato" <[email protected]>
In rev. 1362422 I have refactored the very old code in the org.ofbiz.service.job package (that deals with the execution of
scheduled jobs) to leverage the "Executor" framework of java.util.concurrent.
The classes were very old and they contained a lot of synchronized blocks, some code was still not thread safe, and the execution
policy was intermixed with other code.
The code I have committed is simpler and it delegates the implementation of the execution
policy to the "Executor" framework.
The system behavior is similar to the old one but with some minor differences, including the fact that two attributes of
service-config.xsd ("jobs" and "wait-millis") are no more used.
However it is now much easier to maintain and modify (because it is based on standard apis and it is much slimmer) and I actually
also expect it to be more robust and efficient (but only time will tell).
I did some tests and I couldn't spot any issues but of course, since this is a central and complex part of the framework, there
are chances that I could have introduced some issues: this is why I am asking you to review my work and most of all to report any
bug you may notice and I will address them.
Thanks,
Jacopo