JDBCJobstore « quartz « Java Enterprise Q&A





1. add Cron in jdbcjobstore without making it run immedately    forums.terracotta.org

INSERT INTO QRTZ_JOB_DETAILS (JOB_NAME, JOB_GROUP, JOB_CLASS_NAME, IS_DURABLE, IS_VOLATILE, IS_STATEFUL, REQUESTS_RECOVERY) VALUES ('myCleanup', 'default', 'com.my.CleanupJob', '0', '0', '1', '1'); INSERT INTO QRTZ_TRIGGERS (TRIGGER_NAME, TRIGGER_GROUP, JOB_NAME, JOB_GROUP, IS_VOLATILE,next_fire_time, TRIGGER_STATE, TRIGGER_TYPE, START_TIME) VALUES ('trig_Cleanup', 'default', 'myCleanup', 'default', '0', '1','WAITING', 'CRON', '0'); INSERT INTO QRTZ_CRON_TRIGGERS (TRIGGER_NAME, TRIGGER_GROUP, CRON_EXPRESSION) VALUES ('trig_Cleanup', 'default', '0 0 1 ? * *'); commit;

2. Keep geting org.quartz.impl.jdbcjobstore.LockException with high number of triggers    forums.terracotta.org

Hi I have a Job that parse a sitemap and re-schedule children jobs that download each of the URL found in the sitemap. This means I have a trigger for each of the URL. Not long after sitemap is parsed I keep getting org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Lock wait timeout exceeded; try restarting transaction [See nested exception: java.sql.SQLException: Lock ...

3. Very low throughput using JDBCJobStore    forums.terracotta.org

Hello, We've experiencing a low performance during the load testing in our Quartz application. The DBMS is Oracle 10.2.0.3 (I've also tried with MySQL in localhost), the Application Server is JBoss 4.2.3 and the Quartz version is 1.6.5 (now I'm trying with 1.8.0). I'm creating 100 Triggers wich may fire 1 time per second each, but I'm having a lot of ...

4. CronTrigger misfire + JDBCJobStore    forums.terracotta.org

The situation looks like this: I'm using a JDBCJobStore and have a CronTrigger set, with a MISFIRE_INSTRUCTION_FIRE_ONCE_NOW misfire instruction. I shutdown my application, wait a period of time making the trigger misfire a few times, then start my application again. What is my problem is that nothing happens (trigger fires normally as scheduled, but misfires are ignored), while as far as ...

5. Job parameters, JDBCJobStore questions    forums.terracotta.org

Hi, I have multiple events in my DB, each one will have unique ID. They should be triggered periodically or only once. I need to process them depending on their ID. I realize that it's possible to pass parameters to the Job, but is it possible to pass event ID to the trigger? So Job will be called with ID of ...

6. Apparent race condition in org.quartz.impl.jdbcjobstore.JobStoreSupport    forums.terracotta.org

MisfireHandler: Error handling misfires: Couldn't rollback jdbc connection. Closed Connection org.quartz.JobPersistenceException: Couldn't rollback jdbc connection. Closed Connection [See nested exception: java.sql.SQLException: Closed Connection] at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:2319) at org.quartz.impl.jdbcjobstore.JobStoreCMT.doRecoverMisfires(JobStoreCMT.java:1350) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2449) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2468) * Nested Exception (Underlying Cause) --------------- java.sql.SQLException: Closed Connection at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403) at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3369) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:581) at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:340) at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:2317) at org.quartz.impl.jdbcjobstore.JobStoreCMT.doRecoverMisfires(JobStoreCMT.java:1350) at ...

7. When config jdbcJobStore, NoClassDefFoundError: org/apache/commons/dbcp/BasicDataSource    forums.terracotta.org

Hi, I try to config jdbc jobstore clustering. but always get java.lang.NoClassDefFoundError: org/apache/commons/dbcp/BasicDataSource here is my configuration properties file: # # Configure Main Scheduler Properties # org.quartz.scheduler.instanceName = CronJob4EDNScheduler org.quartz.scheduler.instanceId = AUTO org.quartz.scheduler.rmi.export = false org.quartz.scheduler.rmi.proxy = false # # Configure ThreadPool # org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 25 org.quartz.threadPool.threadPriority = 4 # # Configure JobStore # # JobStore for single ...

8. Classloader fail with JDBCJobStore    forums.terracotta.org

JobDetail jobDetail = null; SimpleTrigger nowTrigger = null; // Use previous as parent class loader ClassLoader prevClassLoader = Thread.currentThread().getContextClassLoader(); //Load all Jars into the ClassLoader URL jarUrlArray[] = (URL[]) jarUrls.toArray(new URL[jarUrls.size()]); ClassLoader current = URLClassLoader.newInstance(jarUrlArray, prevClassLoader); Thread.currentThread().setContextClassLoader(current); Class jobClass = null; try { jobClass = (Class ) current.loadClass("jobs.Job1"); log.info("HERE JOB CLASS IS LOADED"); } catch (ClassNotFoundException e) { log.error(" Class ...

9. Using RAMJObstore and JdbcJObStore simultaneously    forums.terracotta.org

Ssethi, I failed to see how scheduler utils java file is related to your original question. If you have particular and specific problem with Quartz, then ask so. To help other to better help you, try to limit one question per post, and be specific as possible. Asking people to review your code is a expensive request and most people won't ...





10. JDBCJobStore Confusion    forums.terracotta.org

SchedulerFactory factory=new StdSchedulerFactory("quartz.properties"); Scheduler scheduler=factory.getScheduler(); scheduler.start(); JobDetail job=newJob(HelloJob.class).withIdentity("demo11", "group11"). usingJobData("jobSays", "Hello World!") .usingJobData("myFloatValue", 3.141f).storeDurably(true). build(); JobDetail job1=newJob(HelloJob.class).withIdentity("demo1", "group11"). usingJobData("jobSays", "Hello World!") .usingJobData("myFloatValue", 3.141f).storeDurably(true). build(); JobDetail job2=newJob(HelloJob.class).withIdentity("demo2", "group11"). usingJobData("jobSays", "Hello World!") .usingJobData("myFloatValue", 3.141f).storeDurably(true). build(); Trigger trigger=newTrigger().withIdentity("Trigger11","group11").startNow().withSchedule(CronScheduleBuilder.cronSchedule("0 0/1 * * * ?")).build(); Trigger trigger1=newTrigger().withIdentity("Trigger12","group11").startNow().withSchedule(CronScheduleBuilder.cronSchedule("0 0/2 * * * ?")).build(); SimpleTrigger trigger11 = (SimpleTrigger) newTrigger() .withIdentity("trigger1", "group11") .startAt(futureDate(2, IntervalUnit.MINUTE)) .build(); scheduler.scheduleJob(job,trigger1); scheduler.scheduleJob(job1,trigger); scheduler.scheduleJob(job2,trigger11);