QueueBrowser Example

In this post under JMS, I will explain with an example what is QueueBrowser and how to use it. Note: I will be using JMS 2.0 api for this and future examples. The name “QueueBrowser” implies two things 1) It can be used only for queue that means in point to point messaging model. 2)…… Continue reading QueueBrowser Example

Advertisements

Receiving JMS messages asynchronously

In this post under JMS I will explain how to receive messages asynchronously. Note: I will be using JMS 2.0 api for this and future examples. In all my previous post’s examples I have used “receive” method under “JSMConsumer” class to receive messages synchronously. To receive messages asynchronously we will take the help of “javax.jms.MessageListener”…… Continue reading Receiving JMS messages asynchronously

Creating a temporary queue or topic

In this post under JMS I will explain how to create temporary queue or topic. Note: I will be using JMS 2.0 api for this and future examples Non temporary queue or topics are created by administrator and we developers connect to those topic or queue using the below method Destination destination = (Destination)initialContext.lookup(“MyQueue”); Whereas…… Continue reading Creating a temporary queue or topic

Sending and Receiving Map data as JMS message payload

In this post under JMS I will explain how to send and receive Java Map data as JMS Message payload. Note: I will be using JMS 2.0 api for this and future examples Below is the complete main class code Main Class 1 package package3; 2 3 import java.util.Properties; 4 5 import javax.jms.ConnectionFactory; 6 import…… Continue reading Sending and Receiving Map data as JMS message payload

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