In this post of Quartz, I will explain how to add listeners to listen for job events. We can use the listeners to listen for job events and add custom logic at these points. We need to create a class that implements org.quartz.JobListener interface or extends org.quartz.listeners.JobListenerSupport class and override interested events. For our example…… Continue reading Adding Job Listener using JobListener Interface
Category: Quartz Scheduler
Adding Trigger Listener using TriggerListener
In this post of Quartz, I will explain how to add listeners to listen for trigger events. We can use the listeners to listen for trigger events and add custom logic at these points. We need to create a class that implements org.quartz.TriggerListener interface or extends org.quartz.listeners.TriggerListenerSupport class and override interested events. For our example…… Continue reading Adding Trigger Listener using TriggerListener
Quartz JobDataMap Example Part 2
In the previous post under Quartz Scheduler, I explained what JobDataMap is about and I also mentioned that JobDataMap can be passed to an instance of Job through JobDetail and Trigger. In the previous post I explained with an example on how to pass JobDataMap to an instance of Job through JobDetail. In this post…… Continue reading Quartz JobDataMap Example Part 2
Quartz JobDataMap Example Part 1
In this post of Quartz scheduler, I will explain what is JobDataMap and how to use it. JobDataMap is an implementation of java Map interface. In addition to the methods of Map interface additional methods are added for storing and retrieving primitive types. JobDataMap holds data as a key value pair. It is used to…… Continue reading Quartz JobDataMap Example Part 1
Quartz Simple Example
Quartz schedular framework can be used to schedule jobs. This post explains how we can use it with a simple example. We need the below jars 1) c3p0-0.9.1.1.jar 2) log4j-1.2.16.jar 3) quartz-2.2.3.jar 4) quartz-jobs-2.2.3.jar 5) slf4j-api-1.7.7.jar 6) slf4j-log4j12-1.7.7.jar log4j.xml file in the classpath with the below configurations log4j.xml <?xml version=”1.0″ encoding=”UTF-8″?> <!DOCTYPE log4j:configuration SYSTEM “log4j.dtd”>…… Continue reading Quartz Simple Example