diff options
author | Ade Lee <alee@redhat.com> | 2012-01-11 12:57:53 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2012-01-11 13:49:04 -0500 |
commit | 10cfe7756e967ac91c66d33b392aeab9cf3780fb (patch) | |
tree | d5ac9b58442265d2ce5ef60e31f041ddacba1b4f /pki/base/common/src/com/netscape/cmscore/jobs | |
parent | edcb24f65cc3700e75d0a1d14dc2483f210b0ee4 (diff) | |
download | pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.gz pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.xz pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.zip |
Formatting (no line wrap in comments or code)
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/jobs')
4 files changed, 106 insertions, 139 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/CronItem.java b/pki/base/common/src/com/netscape/cmscore/jobs/CronItem.java index 4b248954f..6dd38f2ba 100644 --- a/pki/base/common/src/com/netscape/cmscore/jobs/CronItem.java +++ b/pki/base/common/src/com/netscape/cmscore/jobs/CronItem.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.jobs; - import java.util.StringTokenizer; import java.util.Vector; @@ -25,15 +24,13 @@ import com.netscape.certsrv.apps.CMS; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.logging.ILogger; - /** * class representing one Job cron item - * <p>here, an "item" refers to one of the 5 fields in a cron string; - * "element" refers to any comma-deliminated element in an - * "item"...which includes both numbers and '-' separated ranges. + * <p> + * here, an "item" refers to one of the 5 fields in a cron string; "element" refers to any comma-deliminated element in an "item"...which includes both numbers and '-' separated ranges. * <p> * for each of the 5 cron fields, it's represented as a CronItem - * + * * @author cfu * @version $Revision$, $Date$ */ @@ -49,20 +46,21 @@ public class CronItem { // store all elements in a field. // elements can either be numbers or ranges (CronRange) protected Vector<CronRange> mElements = new Vector<CronRange>(); - + public CronItem(int min, int max) { mMin = min; mMax = max; } - + /** * parses and sets a string cron item + * * @param sItem the string representing an item of a cron string. - * item can be potentially comma separated with ranges specified - * with '-'s + * item can be potentially comma separated with ranges specified + * with '-'s */ public void set(String sItem) throws EBaseException { - + if (sItem.equals(ALL)) { // System.out.println("CronItem set(): item is ALL"); CronRange cr = new CronRange(); @@ -90,7 +88,7 @@ public class CronItem { } catch (NumberFormatException e) { // throw ... log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_INVALID_TOKEN", tok, e.toString())); + CMS.getLogMessage("CMSCORE_JOBS_INVALID_TOKEN", tok, e.toString())); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } String sEnd = tok.substring(r + 1, tok.length()); @@ -100,7 +98,7 @@ public class CronItem { } catch (NumberFormatException e) { // throw ... log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_INVALID_TOKEN", tok, e.toString())); + CMS.getLogMessage("CMSCORE_JOBS_INVALID_TOKEN", tok, e.toString())); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } // got both begin and end for range @@ -112,8 +110,8 @@ public class CronItem { if (!cr.isValidRange(mMin, mMax)) { // throw... log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_INVALID_RANGE", - tok)); + CMS.getLogMessage("CMSCORE_JOBS_INVALID_RANGE", + tok)); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } // System.out.println("CronItem set(): adding a range"); @@ -130,7 +128,7 @@ public class CronItem { if (!cr.isValidRange(mMin, mMax)) { // throw... log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_INVALID_MIN_MAX_RANGE", Integer.toString(mMin), Integer.toString(mMax))); + CMS.getLogMessage("CMSCORE_JOBS_INVALID_MIN_MAX_RANGE", Integer.toString(mMin), Integer.toString(mMax))); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } // System.out.println("CronItem set(): adding a number"); @@ -138,7 +136,7 @@ public class CronItem { } catch (NumberFormatException e) { // throw... log(ILogger.LL_FAILURE, - "invalid item in cron: " + tok); + "invalid item in cron: " + tok); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } } @@ -148,7 +146,8 @@ public class CronItem { /** * get the vector stuffed with elements where each element is - * represented as CronRange + * represented as CronRange + * * @return a vector of CronRanges */ public Vector<CronRange> getElements() { @@ -162,7 +161,6 @@ public class CronItem { if (mLogger == null) return; mLogger.log(ILogger.EV_SYSTEM, ILogger.S_OTHER, - level, "jobs/CronItem: " + msg); + level, "jobs/CronItem: " + msg); } } - diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/CronRange.java b/pki/base/common/src/com/netscape/cmscore/jobs/CronRange.java index 59293ee1b..99696b827 100644 --- a/pki/base/common/src/com/netscape/cmscore/jobs/CronRange.java +++ b/pki/base/common/src/com/netscape/cmscore/jobs/CronRange.java @@ -17,27 +17,21 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.jobs; - - - /** * class representing one Job cron element - * <p>here, an "item" refers to one of the 5 fields in a cron string; - * "element" refers to any comma-deliminated element in an - * "item"...which includes both numbers and '-' separated ranges. * <p> - * an Element can contain either an integer number or a range - * specified as CronRange. In case of integer numbers, begin - * and end are of the same value - * + * here, an "item" refers to one of the 5 fields in a cron string; "element" refers to any comma-deliminated element in an "item"...which includes both numbers and '-' separated ranges. + * <p> + * an Element can contain either an integer number or a range specified as CronRange. In case of integer numbers, begin and end are of the same value + * * @author cfu * @version $Revision$, $Date$ */ public class CronRange { int mBegin = 0; int mEnd = 0; - - public CronRange () { + + public CronRange() { } /** @@ -46,7 +40,7 @@ public class CronRange { public void setBegin(int i) { mBegin = i; } - + /** * gets the lower boundary value of the range */ @@ -70,16 +64,17 @@ public class CronRange { /** * checks to see if the lower and higher boundary values are - * within the min/max. + * within the min/max. + * * @param min the minimum value one can specify in this field * @param max the maximum value one can specify in this field * @return a boolean (true/false) on whether the begin/end values - * are within the min/max passed in the params + * are within the min/max passed in the params */ public boolean isValidRange(int min, int max) { if ((mEnd < mBegin) || - (mBegin < min) || - (mEnd > max)) + (mBegin < min) || + (mEnd > max)) return false; else return true; diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java b/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java index 8272c4484..92f082a2f 100644 --- a/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java +++ b/pki/base/common/src/com/netscape/cmscore/jobs/JobCron.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.jobs; - import java.util.Calendar; import java.util.Enumeration; import java.util.StringTokenizer; @@ -28,24 +27,14 @@ import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.jobs.IJobCron; import com.netscape.certsrv.logging.ILogger; - /** * class representing one Job cron information - * <p>here, an "item" refers to one of the 5 fields in a cron string; - * "element" refers to any comma-deliminated element in an - * "item"...which includes both numbers and '-' separated ranges. - * A cron string in the configuration takes the following format: - * <i>minute (0-59), - * hour (0-23), - * day of the month (1-31), - * month of the year (1-12), - * day of the week (0-6 with 0=Sunday)</i> * <p> - * e.g. jobsScheduler.job.rnJob1.cron=30 11,23 * * 1-5 - * In this example, the job "rnJob1" will be executed from Monday - * through Friday, at 11:30am and 11:30pm. + * here, an "item" refers to one of the 5 fields in a cron string; "element" refers to any comma-deliminated element in an "item"...which includes both numbers and '-' separated ranges. A cron string in the configuration takes the following format: <i>minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), day of the week (0-6 with 0=Sunday)</i> * <p> - * + * e.g. jobsScheduler.job.rnJob1.cron=30 11,23 * * 1-5 In this example, the job "rnJob1" will be executed from Monday through Friday, at 11:30am and 11:30pm. + * <p> + * * @author cfu * @version $Revision$, $Date$ */ @@ -53,7 +42,7 @@ public class JobCron implements IJobCron { /** * CRON_MINUTE, CRON_HOUR, CRON_DAY_OF_MONTH, CRON_MONTH_OF_YEAR, - * and CRON_DAY_OF_WEEK are to be used in <b>getItem()</b> to + * and CRON_DAY_OF_WEEK are to be used in <b>getItem()</b> to * retrieve the corresponding <b>CronItem</b> */ public static final String CRON_MINUTE = "minute"; @@ -72,7 +61,7 @@ public class JobCron implements IJobCron { CronItem cDOW = null; public JobCron(String cronString) - throws EBaseException { + throws EBaseException { mCronString = cronString; // create all 5 items in the cron @@ -84,9 +73,9 @@ public class JobCron implements IJobCron { cronToVals(mCronString); } - - private void cronToVals(String cronString) - throws EBaseException { + + private void cronToVals(String cronString) + throws EBaseException { StringTokenizer st = new StringTokenizer(cronString); String sMinute = null; @@ -101,8 +90,8 @@ public class JobCron implements IJobCron { cMinute.set(sMinute); } } catch (EBaseException e) { - log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_INVALID_MIN", e.toString())); + log(ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_JOBS_INVALID_MIN", e.toString())); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } @@ -142,15 +131,14 @@ public class JobCron implements IJobCron { * the '*' one will remain empty (no elements) */ // day-of-week - if ((sDayOMonth!= null) && sDayOMonth.equals(CronItem.ALL) && (sDayOWeek!= null) && !sDayOWeek.equals(CronItem.ALL)) { + if ((sDayOMonth != null) && sDayOMonth.equals(CronItem.ALL) && (sDayOWeek != null) && !sDayOWeek.equals(CronItem.ALL)) { try { cDOW.set(sDayOWeek); } catch (EBaseException e) { log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INVALID_DAY_OF_WEEK", e.toString())); throw new EBaseException(CMS.getUserMessage("CMS_BASE_INVALID_JOB_CRON")); } - } else - if ((sDayOMonth!= null) && !sDayOMonth.equals(CronItem.ALL) && (sDayOWeek!= null) && sDayOWeek.equals(CronItem.ALL)) { + } else if ((sDayOMonth != null) && !sDayOMonth.equals(CronItem.ALL) && (sDayOWeek != null) && sDayOWeek.equals(CronItem.ALL)) { try { cDOM.set(sDayOMonth); } catch (EBaseException e) { @@ -159,7 +147,7 @@ public class JobCron implements IJobCron { } } else { // if both '*', every day, if neither is '*', do both try { - if (sDayOWeek!= null) { + if (sDayOWeek != null) { cDOW.set(sDayOWeek); } } catch (EBaseException e) { @@ -179,10 +167,11 @@ public class JobCron implements IJobCron { /** * retrieves the cron item - * @param item name of the item. must be one of the <b>CRON_*</b> - * strings defined in this class + * + * @param item name of the item. must be one of the <b>CRON_*</b> + * strings defined in this class * @return an instance of the CronItem class which represents the - * requested cron item + * requested cron item */ public CronItem getItem(String item) { if (item.equals(CRON_MINUTE)) { @@ -204,10 +193,11 @@ public class JobCron implements IJobCron { /** * Does the element fit any element in the item + * * @param element the element of "now" in cron format * @param item the item consists of a vector of elements * @return boolean (true/false) on whether the element is one of - * the elements in the item + * the elements in the item */ boolean isElement(int element, Vector<CronRange> item) { // loop through all of the elements of an item @@ -221,7 +211,7 @@ public class JobCron implements IJobCron { } } else { // is a range if ((element >= cElement.getBegin()) && - (element <= cElement.getEnd())) { + (element <= cElement.getEnd())) { return true; } } @@ -232,10 +222,11 @@ public class JobCron implements IJobCron { /** * convert the day of the week representation from Calendar to - * cron + * cron + * * @param time the Calendar value represents a moment of time * @return an integer value that represents a cron Day-Of-Week - * element + * element */ public int DOW_cal2cron(Calendar time) { int calDow = time.get(Calendar.DAY_OF_WEEK); @@ -280,9 +271,10 @@ public class JobCron implements IJobCron { /** * convert the month of year representation from Calendar to cron + * * @param time the Calendar value represents a moment of time * @return an integer value that represents a cron Month-Of-Year - * element + * element */ public int MOY_cal2cron(Calendar time) { int calMoy = time.get(Calendar.MONTH); @@ -352,6 +344,6 @@ public class JobCron implements IJobCron { if (mLogger == null) return; mLogger.log(ILogger.EV_SYSTEM, ILogger.S_OTHER, - level, msg); + level, msg); } } diff --git a/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java b/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java index ad6cf898d..38ec4a79c 100644 --- a/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java +++ b/pki/base/common/src/com/netscape/cmscore/jobs/JobsScheduler.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.jobs; - import java.util.Calendar; import java.util.Enumeration; import java.util.Hashtable; @@ -35,24 +34,15 @@ import com.netscape.certsrv.jobs.JobPlugin; import com.netscape.certsrv.logging.ILogger; import com.netscape.cmscore.util.Debug; - /** * This is a daemon thread that handles scheduled jobs like cron would - * do with different jobs. This daemon wakes up at a pre-configured + * do with different jobs. This daemon wakes up at a pre-configured * interval to see * if there is any job to be done, if so, a thread is created to execute * the job(s). * <p> - * The interval <b>jobsScheduler.interval</b> in the configuration is - * specified as number of minutes. If not set, the default is 1 minute. - * Note that the cron specification for each job CAN NOT be finer than - * the granularity of the Scheduler daemon interval. For example, if - * the daemon interval is set to 5 minute, a job cron for every minute - * at 7am on each Tuesday (e.g. * 7 * * 2) will result in the - * execution of the job thread only once every 5 minutes during that - * hour. <b>The inteval value is recommended at 1 minute, setting it - * otherwise has the potential of forever missing the beat</b>. Use - * with caution. + * The interval <b>jobsScheduler.interval</b> in the configuration is specified as number of minutes. If not set, the default is 1 minute. Note that the cron specification for each job CAN NOT be finer than the granularity of the Scheduler daemon interval. For example, if the daemon interval is set to 5 minute, a job cron for every minute at 7am on each Tuesday (e.g. * 7 * * 2) will result in the execution of the job thread only once every 5 minutes during that hour. <b>The inteval value is + * recommended at 1 minute, setting it otherwise has the potential of forever missing the beat</b>. Use with caution. * * @author cfu * @see JobCron @@ -96,16 +86,12 @@ public class JobsScheduler implements Runnable, IJobsScheduler { * read from the config file all implementations of Jobs, * register and initialize them * <p> - * the config params have the following formats: - * jobScheduler.impl.[implementation name].class=[package name] - * jobScheduler.job.[job name].pluginName=[implementation name] - * jobScheduler.job.[job name].cron=[crontab format] - * jobScheduler.job.[job name].[any job specific params]=[values] + * the config params have the following formats: jobScheduler.impl.[implementation name].class=[package name] jobScheduler.job.[job name].pluginName=[implementation name] jobScheduler.job.[job name].cron=[crontab format] jobScheduler.job.[job name].[any job specific params]=[values] * * @param config jobsScheduler configStore */ public void init(ISubsystem owner, IConfigStore config) - throws EBaseException, EJobsException { + throws EBaseException, EJobsException { mLogger = CMS.getLogger(); // read in config parameters and set variables @@ -142,14 +128,13 @@ public class JobsScheduler implements Runnable, IJobsScheduler { String jobName = (String) jobs.nextElement(); String implName = c.getString(jobName + "." + PROP_PLUGIN); JobPlugin plugin = - (JobPlugin) mJobPlugins.get(implName); + (JobPlugin) mJobPlugins.get(implName); if (plugin == null) { - log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_CLASS_NOT_FOUND", - implName)); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_PLUGIN_NOT_FOUND", implName)); + log(ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_JOBS_CLASS_NOT_FOUND", + implName)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_PLUGIN_NOT_FOUND", implName)); } String classPath = plugin.getClassPath(); @@ -169,20 +154,17 @@ public class JobsScheduler implements Runnable, IJobsScheduler { String errMsg = "JobsScheduler:: init()-" + e.toString(); log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString())); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath)); } catch (IllegalAccessException e) { String errMsg = "JobsScheduler:: init()-" + e.toString(); log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString())); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath)); } catch (InstantiationException e) { String errMsg = "JobsScheduler: init()-" + e.toString(); log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString())); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", classPath)); } catch (EBaseException e) { log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_JOBS_INIT_ERROR", e.toString())); throw e; @@ -208,8 +190,8 @@ public class JobsScheduler implements Runnable, IJobsScheduler { * when wake up: * . execute the scheduled job(s) * * if job still running from previous interval, skip it - * . figure out when is the next wakeup time (every interval). If - * current wakup time runs over the interval, skip the missed interval(s) + * . figure out when is the next wakeup time (every interval). If + * current wakup time runs over the interval, skip the missed interval(s) * . sleep till the next wakeup time */ public void run() { @@ -230,8 +212,8 @@ public class JobsScheduler implements Runnable, IJobsScheduler { // just let it skip to next second, fine. duration = (60 - second) * 1000 + 1000 - milliSec; log(ILogger.LL_INFO, - "adjustment for cron behavior: sleep for " + - duration + " milliseconds"); + "adjustment for cron behavior: sleep for " + + duration + " milliseconds"); } else { // when is the next wakeup time for the JobsScheduler? @@ -268,14 +250,14 @@ public class JobsScheduler implements Runnable, IJobsScheduler { // get time now cal = Calendar.getInstance(); - + /** * Get the current time outside the jobs while loop * to make sure that the rightful jobs are run * -- milliseconds from the epoch */ wokeupTime = cal.getTime().getTime(); - + IJob job = null; for (Enumeration<IJob> e = mJobs.elements(); e.hasMoreElements();) { @@ -310,14 +292,14 @@ public class JobsScheduler implements Runnable, IJobsScheduler { } else { // previous thread still alive, log it log(ILogger.LL_INFO, "Job " + job.getId() + - " still running...skipping this round"); + " still running...skipping this round"); } } } // for } } - + public IJobCron createJobCron(String cs) throws EBaseException { return new JobCron(cs); } @@ -338,8 +320,8 @@ public class JobsScheduler implements Runnable, IJobsScheduler { * is it the right month? */ Vector<CronRange> moy = - jcron.getItem(JobCron.CRON_MONTH_OF_YEAR).getElements(); - + jcron.getItem(JobCron.CRON_MONTH_OF_YEAR).getElements(); + int cronMoy = jcron.MOY_cal2cron(now); if (jcron.isElement(cronMoy, moy) == false) { @@ -361,7 +343,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler { int cronDow = jcron.DOW_cal2cron(now); if ((jcron.isElement(cronDow, dow) == false) && - (jcron.isElement(now.get(Calendar.DAY_OF_MONTH), dom) == false)) { + (jcron.isElement(now.get(Calendar.DAY_OF_MONTH), dom) == false)) { return false; } // is the right date! @@ -391,16 +373,18 @@ public class JobsScheduler implements Runnable, IJobsScheduler { /** * Retrieves id (name) of this subsystem. + * * @return name of the Jobs Scheduler subsystem */ public String getId() { return (mId); } - + /** * Sets id string to this subsystem. * <p> - * Use with caution. Should not do it when sharing with others + * Use with caution. Should not do it when sharing with others + * * @param id name to be applied to an Jobs Scheduler subsystem */ public void setId(String id) throws EBaseException { @@ -427,7 +411,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler { } /** - * shuts down Jobs one by one. + * shuts down Jobs one by one. * <P> */ public void shutdown() { @@ -438,8 +422,8 @@ public class JobsScheduler implements Runnable, IJobsScheduler { Enumeration<String> enums = mJobThreads.keys(); while (enums.hasMoreElements()) { - String id = (String)enums.nextElement(); - Thread currthread = (Thread)mJobThreads.get(id); + String id = (String) enums.nextElement(); + Thread currthread = (Thread) mJobThreads.get(id); //if (currthread != null) // currthread.destroy(); } @@ -448,13 +432,13 @@ public class JobsScheduler implements Runnable, IJobsScheduler { mJobThreads = null; //if (mScheduleThread != null) - // mScheduleThread.destroy(); + // mScheduleThread.destroy(); } /** * Returns the root configuration storage of this system. * <P> - * + * * @return configuration store of this subsystem */ public IConfigStore getConfigStore() { @@ -462,22 +446,23 @@ public class JobsScheduler implements Runnable, IJobsScheduler { } /** - * Gets configuration parameters for the given + * Gets configuration parameters for the given * job plugin. + * * @param implName Name of the job plugin. * @return Hashtable of required parameters. */ public String[] getConfigParams(String implName) - throws EJobsException { + throws EJobsException { if (Debug.ON) Debug.trace("in getCofigParams()"); - // is this a registered implname? + // is this a registered implname? JobPlugin plugin = (JobPlugin) mJobPlugins.get(implName); if (plugin == null) { - log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_CLASS_NOT_FOUND", implName)); + log(ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_JOBS_CLASS_NOT_FOUND", implName)); if (Debug.ON) Debug.trace("Job plugin " + implName + " not found."); throw new EJobsException(CMS.getUserMessage("CMS_JOB_PLUGIN_NOT_FOUND", @@ -500,26 +485,23 @@ public class JobsScheduler implements Runnable, IJobsScheduler { Debug.trace("class instantiated"); return (jobInst.getConfigParams()); } catch (InstantiationException e) { - log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString())); + log(ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString())); if (Debug.ON) Debug.trace("class NOT instantiated: " + e.toString()); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className)); } catch (ClassNotFoundException e) { - log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString())); + log(ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString())); if (Debug.ON) Debug.trace("class NOT instantiated: " + e.toString()); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className)); } catch (IllegalAccessException e) { - log(ILogger.LL_FAILURE, - CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString())); + log(ILogger.LL_FAILURE, + CMS.getLogMessage("CMSCORE_JOBS_CREATE_NEW", e.toString())); if (Debug.ON) Debug.trace("class NOT instantiated: " + e.toString()); - throw new - EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className)); + throw new EJobsException(CMS.getUserMessage("CMS_JOB_LOAD_CLASS_FAILED", className)); } } @@ -534,7 +516,7 @@ public class JobsScheduler implements Runnable, IJobsScheduler { if (mLogger == null) return; mLogger.log(ILogger.EV_SYSTEM, ILogger.S_OTHER, - level, msg); + level, msg); } public Hashtable<String, JobPlugin> getJobPlugins() { |