(OFBIZ-11035)
When try to define a temporal expression for a recurring job where the temporal expression should be evaluated using a timezone other than whatever the default timezone is for the system.
The use case is having a system that runs on UTC time but needs to send a report at 5 pm Pacific Time every day regardless of whether or not daylight savings is in effect.
To do this:
Added a new field to JobSandbox such as recurrenceTimeZone and modified code to use this timeZone if available.
Thanks: Scott Gray for reporting and Nicolas Malin for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866499 13f79535-47bb-0310-9956-ffa450edef68
JobPoller so that important jobs can be prioritized over normal jobs, and low
priority jobs can be left until last. [OFBIZ-10865]
Changes are as follows:
* Add a "priority" field to JobSandbox entity (numeric/Long)
* Add JobPriority constants class containing fields LOW (0), NORMAL (50) and HIGH (100)
* Add getPriority method to the Job interface and implement methods for AbstractJob (returns NORMAL), PersistedServiceJob (returns JobSandbox.priority) and PurgeJob (returns LOW)
* Change the JobPoller executor's queue to use PriorityBlockingQueue (unbounded) instead of LinkedBlockingQueue (bounded)
* Implement custom Comparator for the priority queue to sort by priority descending and then runTime ascending
* Change the poll size per poll to be (queueSize() - queue.size) instead of queue.remainingCapacity() due to the new queue being unbounded
* I've also opted to limit the database poll query to the poll size using maxRows() because it seemed dangerous to me to use an unconstrained query on this table
* Ensured recurring jobs receive the default (NORMAL) priority when being rescheduled so that they're sorted correctly on the next time they show up in the database poll
* Ensured jobs generated at runtime are given a default priority of NORMAL
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857071 13f79535-47bb-0310-9956-ffa450edef68
This improvement add a entity JobManagerLock, a new screen to add/edit job manager lock and an information for end user on FindJob and ScheduleJob screen.
See more information on issue OFBIZ-6790. Thanks to Jacques for sharing on this improvement.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1727570 13f79535-47bb-0310-9956-ffa450edef68
This patch introduces some constants for the expression types and corrects the wrong comparison.
Thanks Vyom Jain for spotting this issue and Martin Becker for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704043 13f79535-47bb-0310-9956-ffa450edef68
We have a service which semaphore set to "fail". Someday, while it was running, the whole ofbiz crashed.
After the restart, the service is unable to run anymore since the lock file (database record in ServiceSemaphore entity) is already there.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604363 13f79535-47bb-0310-9956-ffa450edef68
Sascha: We noticed that OFBiz was sending cache clears over JMS every time the job sandbox is changed. That's not a problem with one OFBiz Instance but with 20, when every instance is sending JMS messages to each other ... you can imagine...
Scott: I'd agree with this, there is really no good reason to cache JobSandbox values even though I don't believe any code does this at the moment. On a side note I ran into some problems with the Job Poller when it's under a heavy load recently and as soon as I get a chance I'll be working to reproduce and fix the issues.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1003418 13f79535-47bb-0310-9956-ffa450edef68
<copyright>Copyright 2001-.* The Apache Software Foundation</copyright>
<copyright><year>.*</year><holder>Apache Foundation</holder></copyright>
<copyright><year>.*</year><holder>Apache Foundation.</holder></copyright>
<owner>Copyright 2001-.* The Apache Software Foundation</owner>
Less to update every year!
Thanks to BJ 1st effort at "update files from 2009 to 2010" (https://issues.apache.org/jira/browse/OFBIZ-3783) - OFBIZ-3783
Note: there are been a lot of efforts in 2009: there are plenty of data dated from this year!
I hope I did not broke anything (should not, but of course I did not try all changes...) Anyway, this can be easily reverted...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948846 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
I tried my best to break this up into re-usable pieces and put them where I thought they made sense. Feel free to move things around if you have a better idea.
Internationalization note: this commit contains new UI labels.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@700310 13f79535-47bb-0310-9956-ffa450edef68
I moved the recurrence count to the job sandbox. Keeping counters in the recurrence info was a bad idea. Any other code that relied upon counters in recurrence info will have to be redesigned to use temporal expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@695695 13f79535-47bb-0310-9956-ffa450edef68
A real replace in files feature was one of the reasons I use Eclipse 3.4 for near a year now (I even helped to test, a real must have :o)
Not sure previous commit was sent partially or not at all (I needed to update)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@677685 13f79535-47bb-0310-9956-ffa450edef68
None - Does no locking
Wait - Waits for the previous service to complete (currently up to 5 minutes)
Fail - Fails when the same service is already running
use the semaphore="none|wait|fail" in the service definition (none is the default when the attribute is not defined)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575074 13f79535-47bb-0310-9956-ffa450edef68
I put also some svn:ignore for shark build and lib diretories and assetmaint/build
I did some by hand lately, too much to remember. They were files with old header but without copyright. A 1st attempt I suppose, will have to check this after this commit.
I add some problems to commit this patch in one piece because it's so huge (specially with Eclipse I had to turn to Tortoise) !
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@499486 13f79535-47bb-0310-9956-ffa450edef68