/** * <p> * Called during creation of the <code>Scheduler</code> in order to give * the <code>SchedulerPlugin</code> a chance to initialize. * </p> * * @throws org.quartz.SchedulerConfigException * if there is an error initializing. */ public void initialize(String name, final Scheduler scheduler) throws SchedulerException { super.initialize(name, scheduler); classLoadHelper = new CascadingClassLoadHelper(); classLoadHelper.initialize(); getLog().info("Registering Quartz Job Initialization Plug-in."); // Create JobFile objects StringTokenizer stok = new StringTokenizer(fileNames, FILE_NAME_DELIMITERS); while (stok.hasMoreTokens()) { final String fileName = stok.nextToken(); final JobFile jobFile = new JobFile(fileName); jobFiles.put(fileName, jobFile); } }
String jobTriggerName = buildJobTriggerName(jobFile.getFileBasename()); FileScanJob.class); job.setVolatility(true); job.getJobDataMap().put(FileScanJob.FILE_NAME, jobFile.getFileName()); job.getJobDataMap().put(FileScanJob.FILE_SCAN_LISTENER_NAME, JOB_INITIALIZATION_PLUGIN_NAME + '_' + getName());
String furl = null; File file = new File(getFileName()); // files in filesystem if (!file.exists()) { URL url = classLoadHelper.getResource(getFileName()); if(url != null) { if (isFailOnFileNotFound()) { throw new SchedulerException( "File named '" + getFileName() + "' does not exist."); } else { getLog().warn("File named '" + getFileName() + "' does not exist."); getLog().warn("Error closing jobs file " + getFileName(), ioe);
String furl = null; File file = new File(getFileName()); // files in filesystem if (!file.exists()) { URL url = classLoadHelper.getResource(getFileName()); if(url != null) { if (isFailOnFileNotFound()) { throw new SchedulerException( "File named '" + getFileName() + "' does not exist."); } else { getLog().warn("File named '" + getFileName() + "' does not exist."); getLog().warn("Error closing jobs file " + getFileName(), ioe);
String jobTriggerName = buildJobTriggerName(jobFile.getFileBasename()); FileScanJob.class); job.setVolatility(true); job.getJobDataMap().put(FileScanJob.FILE_NAME, jobFile.getFileName()); job.getJobDataMap().put(FileScanJob.FILE_SCAN_LISTENER_NAME, JOB_INITIALIZATION_PLUGIN_NAME + '_' + getName());
/** * <p> * Called during creation of the <code>Scheduler</code> in order to give * the <code>SchedulerPlugin</code> a chance to initialize. * </p> * * @throws org.quartz.SchedulerConfigException * if there is an error initializing. */ public void initialize(String name, final Scheduler scheduler) throws SchedulerException { super.initialize(name, scheduler); classLoadHelper = new CascadingClassLoadHelper(); classLoadHelper.initialize(); getLog().info("Registering Quartz Job Initialization Plug-in."); // Create JobFile objects StringTokenizer stok = new StringTokenizer(fileNames, FILE_NAME_DELIMITERS); while (stok.hasMoreTokens()) { final String fileName = stok.nextToken(); final JobFile jobFile = new JobFile(fileName); jobFiles.put(fileName, jobFile); } }
private void processFile(JobFile jobFile) { if (jobFile == null || !jobFile.getFileFound()) { return; } JobSchedulingDataProcessor processor = new JobSchedulingDataProcessor(this.classLoadHelper, isValidating(), isValidatingSchema()); try { processor.processFileAndScheduleJobs( jobFile.getFileName(), jobFile.getFileName(), // systemId getScheduler(), isOverWriteExistingJobs()); } catch (Exception e) { getLog().error("Error scheduling jobs: " + e.getMessage(), e); } }
protected JobFile(String fileName) throws SchedulerException { this.fileName = fileName; initialize(); }
private void processFile(JobFile jobFile) { if (jobFile == null || !jobFile.getFileFound()) { return; } JobSchedulingDataProcessor processor = new JobSchedulingDataProcessor(this.classLoadHelper, isValidating(), isValidatingSchema()); try { processor.processFileAndScheduleJobs( jobFile.getFileName(), jobFile.getFileName(), // systemId getScheduler(), isOverWriteExistingJobs()); } catch (Exception e) { getLog().error("Error scheduling jobs: " + e.getMessage(), e); } }
protected JobFile(String fileName) throws SchedulerException { this.fileName = fileName; initialize(); }