I am using JBoss6 and want to dynamically create Quartz-Jobs. During job processing, the next start time will be determined (for example, after 1, 5 or 10 hours).
I did not find any solutions for this, even accessing org.quartz.Scheduler (see QuartzScheduler injection in JBoss AS 6 ).
The next problem is the creation of new work assignments, I followed the tutorial http://www.quartz-scheduler.org/docs/tutorial/TutorialLesson02.html :
import static org.quartz.JobBuilder.*; import static org.quartz.SimpleScheduleBuilder.*; import static org.quartz.CronScheduleBuilder.*; import static org.quartz.CalendarIntervalScheduleBuilder.*; import static org.quartz.TriggerBuilder.*; import static org.quartz.DateBuilder.*;
But it looks like org.quartz.JobBuilder not available for JBoss6. If I manually add a quartz dependency, you have errors on startup (problems loading classes). These artifacts are defined (without explicit use of quartz):
<dependency> <groupId>org.jboss.jbossas</groupId> <artifactId>jboss-as-client</artifactId> <version>6.0.0.Final</version> <type>pom</type> <scope>test</scope> <exclusions> <exclusion> <groupId>org.jboss.security</groupId> <artifactId>jbosssx-client</artifactId> </exclusion> <exclusion> <groupId>org.jboss.security</groupId> <artifactId>jbosssx</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>1.0.0.Final</version> <type>pom</type> <scope>provided</scope> </dependency>
source share