Completable Future To Fetch Data Asynchronously

Asynchronous Data Here I am going to show you how to fetch data asynchronously. So, data which are not coordinated in time will be fetched any time. This means that data is sent at irregular intervals, without any specific time or synchronization between the sender and receiver. In this example I am going to use CompletableFuture from Java 8’s new…

Microservices Asynchronous Communication – Push Notifications

Introduction The example I will show you here about the asynchronous communication among microservices or how microservices communicate asynchronously among themselves. A microservices-based application is a distributed system running on multiple processes or services, usually even across multiple servers or hosts. Each service instance is typically a process. Therefore, services must interact using an inter-process communication protocol such as HTTP…

Spring Asynchronous Request Processing via DeferredResult Class

Asynchronous via DeferredResult I am going to discuss here how to perform asynchronous request processing via Spring’s DeferredResult class. A DeferredResult can be used when the application wants to produce the return value from a thread of its own choice. A DeferredResult is what is possibly not-yet-finished computation that will be available in future. Spring MVC 3.2 introduced a Servlet…

Spring Asynchronous Execution using @Async

Spring Async In this tutorial I will discuss about the asynchronous execution support in Spring using the @Async annotation. There are cases where Spring framework’s @Async is necessary to execute piece of code asynchronous. An example would be while sending a (JMS) message from one system to another system. The advantage is that the user does not have to wait…

How to concurrently execute tasks using Java in Spring

This tutorials will show you how we can concurrently execute different operations using Java utility class called java.util.concurrent.Executors in Spring framework. Spring supports XML as well as Programmatic configuration of beans but, here we will use XML based metadata configuration. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I…

Asynchronous REST Service Using Jersey – Connection Callback

Introduction Here I am going to give an example on how Asynchronous REST webservice with Connection Callback. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP…

Asynchronous REST Service Using Jersey – Completion Callback

Introduction Here I am going to give an example on how Asynchronous REST webservice with Completion Callback. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP…

Asynchronous REST Service With Timeout Using Jersey

Introduction Here I am going to give an example Asynchronous REST service with Timeout using Jersey API. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP…

Simple Asynchronous REST Service Using Jersey

Introduction Here I am going to give an example on how Asynchronous REST webservice works. This is a simple asynchronous REST service using Jersey API. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources….

Configure JMS Client using GlassFish 3

I have taken Theoretical concepts from http://docs.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/overview.html#1027335 with a little modifications. What Is Messaging ? Messaging is a method of communication between software components or applications. A messaging system is a peer-to-peer facility: A messaging client can send messages to, and receive messages from, any other client. Each client connects to a messaging agent that provides facilities for creating, sending,…