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
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
Chaining multiple ItemProcessor
In this post of Spring Batch, I will explain with an example how to chain multiple ItemProcessors. For my example, I will create an ItemProcessor which will go through employee records one item at a time and filter out odd records. Below is the code of the ItemProcessor package xml.package11; import org.springframework.batch.item.ItemProcessor; public class EmployeeFilterItemProcessor…… Continue reading Chaining multiple ItemProcessor
ItemReadListener, ItemWriteListener, and ItemProcessListener Example
In this post under Spring Batch, I will explain how to create listeners during 1) reading of an item2) writing of an items3) processing of an item with an example. We create listeners by implementing the three interfaces ItemReadListener, ItemWriteListener, and ItemProcessListener. The class that implements ItemReadListener<T> interface must provide implementation for the below three…… Continue reading ItemReadListener, ItemWriteListener, and ItemProcessListener Example
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
DefaultTask example
In all my previous post under Gradle, I have executed a task by entering the below command in the command line. gradle taskName where taskName is the name of the task to be executed If we just type gradle, the output will be as shown below Output E:\Projects\GradleConcepts\package3>gradle Starting a Gradle Daemon, 1 incompatible Daemon…… Continue reading DefaultTask example
Adding Chunk Level Listeners using ChunkListener
In this post of Spring Batch, I will explain how to add chunk level listeners. In Spring Batch, items are read one at a time, but written to file as a chunk (a collection of records written as one unit). So if total records are 100 and chunk size is 50, they will be two…… Continue reading Adding Chunk Level Listeners using ChunkListener
Excluding tasks from execution
In this post of Gradle, I will show how to exclude a particular task from execution. Below is the gradle script with three tasks build.gradle task task1 { doFirst { println ‘I am task1’ } } task task2 { doFirst { println ‘I am task2’ } } task task3 { doFirst { println ‘I am…… Continue reading Excluding tasks from execution
Executing multiple tasks
In this post of Gradle, I will show how to execute multiple tasks from command line. Below is the gradle script with three tasks build.gradle task task1 { doFirst { println ‘I am task1’ } } task task2 { doFirst { println ‘I am task2’ } } task task3 { doFirst { println ‘I am…… Continue reading Executing multiple tasks
Selecting elements that are descendants of another element
In this post of JQuery, I will show how to select elements that are descendants of another element. Below is the complete html code that will be used as an example 1 <html> 2 <head> 3 https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js 4 </head> 5 <body> 6 7 function selectDescendantElement() { 8 var $element = $(‘div li’); 9 alert($element.length); 10…… Continue reading Selecting elements that are descendants of another element