Author: adrianc
Date: Sun Aug 19 11:33:07 2012
New Revision: 1374736
URL: http://svn.apache.org/viewvc?rev=1374736&view=rev
Log:
Some Job Scheduler related notes/warnings - no functional change.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1374736&r1=1374735&r2=1374736&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
Sun Aug 19 11:33:07 2012
@@ -5569,6 +5569,7 @@ public class OrderServices {
boolean processAllOrders = context.get("processAllOrders") == null ?
false : (Boolean) context.get("processAllOrders");
if (orderEntryFromDateTime == null && !processAllOrders) {
// No from date supplied, check to see when this service last ran
and use the startDateTime
+ // FIXME: This code is unreliable - the JobSandbox value might
have been purged. Use another mechanism to persist orderEntryFromDateTime.
EntityCondition cond =
EntityCondition.makeCondition(UtilMisc.toMap("statusId", "SERVICE_FINISHED",
"serviceName", "createAlsoBoughtProductAssocs"));
EntityFindOptions efo = new EntityFindOptions();
efo.setMaxRows(1);
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=1374736&r1=1374735&r2=1374736&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
(original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Sun
Aug 19 11:33:07 2012
@@ -369,6 +369,7 @@ public class ServiceUtil {
}
public static Map<String, Object> purgeOldJobs(DispatchContext dctx,
Map<String, ? extends Object> context) {
+ Debug.logWarning("WARNING: purgeOldJobs service invoked. This service
is obsolete - the Job Scheduler will purge old jobs automatically.", module);
String sendPool = ServiceConfigUtil.getSendPool();
int daysToKeep = ServiceConfigUtil.getPurgeJobDays();
Delegator delegator = dctx.getDelegator();
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1374736&r1=1374735&r2=1374736&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
(original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Sun
Aug 19 11:33:07 2012
@@ -54,15 +54,14 @@ import org.ofbiz.service.config.ServiceC
import com.ibm.icu.util.Calendar;
/**
- * Job manager. The job manager queues jobs. It contains a
<code>JobPoller</code> and a
- * <code>Delegator</code>. Client code can queue a job to be run immediately
by calling the
- * {@link #runJob(Job)} method, or schedule a job to be run later by calling
the
+ * Job manager. The job manager queues and manages jobs. Client code can queue
a job to be run immediately
+ * by calling the {@link #runJob(Job)} method, or schedule a job to be run
later by calling the
* {@link #schedule(String, String, String, Map, long, int, int, int, long,
int)} method.
* Scheduled jobs are persisted in the JobSandbox entity.
* <p>A scheduled job's start time is an approximation - the actual start time
will depend
* on the job manager/job poller configuration (poll interval) and the load on
the server.
* Scheduled jobs might be rescheduled if the server is busy. Therefore,
applications
- * requiring a precise job start time should use a different method to
schedule the job.</p>
+ * requiring a precise job start time should use a different mechanism to
schedule the job.</p>
*/
public final class JobManager {