[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: Bermudo  XML
Profile for Bermudo -> Messages posted by Bermudo [7]
Author Message
I am trying to load a Quartz application into JBoss 7.1. It is an update to Quartz 2.2.1, which ran without problems under 2.1.7.

Loading the new version into JBoss throws a ClassNotFoundException:

Caused by: java.lang.ClassNotFoundException: org.terracotta.quartz.DefaultClusteredJobStore

I can find no reference to org.terracotta.quartz.DefaultClusteredJobStore in the documentation. Is there a hidden dependency somewhere in the code?

The cron expression by itself is correct. How are you loading the job into the scheduler?
Well, if the job fires immediately then that's what your cron expression indicates.

If you want to start it at a later date or time, you can set a start time for a trigger. See the documentation of the TriggerBuilder.
Thank you for your response.

If I understand the documentation correctly, a 'JobPersistenceException' will be thrown if I try to delete a calendar while another trigger, registered in the scheduler, is modified by that calendar.

No need to respond if my assumption is correct. (I'll find out anyway.)

Thanks again.
I guess I was three steps ahead of you. I have used Quartz both in web applications as well as simple socket servers to control the scheduler without JMX. But that takes a little programming.

If you want to add and delete jobs and triggers without interacting programmatically with the scheduler, you can do it by using XML job configuration with the XMLSchedulingDataProcessorPlugin.

Since Quartz version 2, the configuration schema contains elements--'preprocessing-commands' and 'preprocessing-instructions'--that let you control how jobs and triggers are loaded when the configuration file is (re-)loaded. (See, for example, 'preprocessing-commands' child elements 'delete-job', 'delete-job,-in-group', 'delete-trigger', 'delete-triggers-in-group'.)

The documentation is bit sparse, but once you have the plugin configured and working, it is not difficult to figure out the right XML configuration.
No matter what you are trying to accomplish, you should NEVER access the Quartz database tables directly. They are managed by the scheduler.

I assume that you want to delete a job, not stop (interrupt) it.

If you want to delete a trigger, you retrieve the scheduler instance and call unscheduleJob( <TriggerKey> ), where TriggerKey contains the names of the trigger and trigger group.

You can also call deleteJob( <JobKey> ) but this will delete ALL triggers, not just one.
I have two questions to which I can't find an answer in the documentation.

If I schedule a job with a trigger that is configured with an exclusion calendar, and the calendar is not registered in the scheduler, a SchedulerException is thrown and the job not scheduled.

Suppose the scheduler has a job and a calendar registered but the calendar gets deleted (not the job), what is going to happen? Is this going to affect the scheduler and perhaps cause an unrecoverable error, or is it going to affect the job and perhaps throw a JobExecutionException?

Thanks in advance.
Profile for Bermudo -> Messages posted by Bermudo [7]
Go to:   
Powered by JForum 2.1.7 © JForum Team