Author: jaz
Date: Tue Dec 18 10:46:02 2007 New Revision: 605290 URL: http://svn.apache.org/viewvc?rev=605290&view=rev Log: added initial status when using the schedule() method; changed wait() to sleep() in invoker Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java?rev=605290&r1=605289&r2=605290&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java Tue Dec 18 10:46:02 2007 @@ -210,7 +210,7 @@ if (job == null) { try { - wait(wait); + java.lang.Thread.sleep(wait); } catch (InterruptedException ie) { Debug.logError(ie, "JobInvoker.run() : InterruptedException", module); stop(); 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=605290&r1=605289&r2=605290&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 Tue Dec 18 10:46:02 2007 @@ -398,7 +398,7 @@ jobName = Long.toString((new Date().getTime())); } Map<String, Object> jFields = UtilMisc.<String, Object>toMap("jobName", jobName, "runTime", new java.sql.Timestamp(startTime), - "serviceName", serviceName, "recurrenceInfoId", infoId, "runtimeDataId", dataId); + "serviceName", serviceName, "statusId", "SERVICE_PENDING", "recurrenceInfoId", infoId, "runtimeDataId", dataId); // set the pool ID if (poolName != null && poolName.length() > 0) { @@ -414,7 +414,7 @@ jFields.put("maxRetry", Long.valueOf(maxRetry)); // create the value and store - GenericValue jobV = null; + GenericValue jobV; try { jobV = delegator.makeValue("JobSandbox", jFields); delegator.createSetNextSeqId(jobV); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java?rev=605290&r1=605289&r2=605290&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java Tue Dec 18 10:46:02 2007 @@ -88,10 +88,12 @@ try { // grab a list of jobs to run. List<Job> pollList = jm.poll(); + //Debug.logInfo("Received poll list from JobManager [" + pollList.size() + "]", module); for (Job job : pollList) { if (job.isValid()) { queueNow(job); + //Debug.logInfo("Job [" + job.getJobId() + "] is queued", module); } } // NOTE: using sleep instead of wait for stricter locking |
Free forum by Nabble | Edit this page |