Changing Skip Policy to out of box provided skip policies

In this post under Spring Batch, I will explain how to change skip policy to one of out of the box provided skip policies. Whenever we use the “skip-limit” attribute and “skippable-exception-classes” element as shown below at line 4 and 5 1 <batch:job id=”importEmployees”> 2 <batch:step id=”readWriteEmployees”> 3 <batch:tasklet> 4 <batch:chunk reader=”reader” writer=”writer” commit-interval=”50″ skip-limit=”200″>…… Continue reading Changing Skip Policy to out of box provided skip policies

Setting/Accessing properties of JMS messages

In this post, I will explain how to set and access properties of a JMS messaages. Note: I will be using JMS 2.0 api for this and future examples Below is the complete Main code. Main Class 1 package package2; 2 3 import java.util.Properties; 4 5 import javax.jms.ConnectionFactory; 6 import javax.jms.Destination; 7 import javax.jms.JMSException; 8…… Continue reading Setting/Accessing properties of JMS messages

Changing default configurations specific to YamlWriter

In this post under YamlBeans, I will explain with example how to change default configurations specific to YamlWriter. We take the help of YamlConfig.WriteConfig class. It is a inner static class. It has getters and setters that can be used to change default configurations specific to YamlWriter. For this example, we will use the below…… Continue reading Changing default configurations specific to YamlWriter

Changing default configurations specific to YamlReader

In this post under YamlBeans, I will explain with example how to change default configurations specific to YamlReader. We take the help of YamlConfig.ReadConfig class. It is a inner static class. It has getters and setters that can be used to change default configurations specific to YamlReader. For this example, we will use the below…… Continue reading Changing default configurations specific to YamlReader

Changing default configurations common to both YamlWriter and YamlReader

In this post under YamlBeans, I will explain with example how to change default configurations common to both YamlWriter and YamlReader. The YamlConfig class has getter and setters that can be used to change default configurations. For this example, we will use the below Employee1 class structure. Employee1 class import java.util.List; public class Employee1 {…… Continue reading Changing default configurations common to both YamlWriter and YamlReader

ExclusionStrategy example during deserialization of object

In this post under Gson, I will explain how we can exclude certain fields of a json data from being deserialized with an example. Below is the Employee class structure that will be used to create an instance and its field are set with the values obtained from Employee.json file. Employee class public class Employee…… Continue reading ExclusionStrategy example during deserialization of object