Posts

Showing posts with the label Integration Tier

Service Activator Pattern

Image
In enterprise applications, a majority of the processing is done in a synchronous manner. A client invokes a business service and waits until the business service returns from processing. However, the business processing in some use cases takes considerable time and resources. The business processing might even span applications, possibly integrating with applications inside and outside the enterprise. For these long-lived processes, it is not feasible for application clients to wait until the business processing completes so in this case we want to invoke services asynchronously. Some long-running use cases take a long time. Instead of blocking the users, we can run these asynchronously JMS is a good example of  Service Activator Pattern - JMS (Java Message Service) is an API that provides the facility to create, send and read messages. It provides loosely coupled reliable and asynchronous communication. This pattern is divided into a number of sections for simplicity like pr...

Data Access Object

The object provides an abstract interface to some type of database or another persistence mechanism. Let's discuss how DAO encapsulates data access and manipulation in a separate layer.  It is hard to understand this pattern so my suggestion is to go to  source code section  and have a look at code step by step gives you more clarity.  This pattern is divided into a number of sections for simplicity like problem, forces, solution, implementation etc. Table of contents Problem Forces Solution Structure - Class Diagram, Sequence Diagram Participants and Responsibilities Implementation Consequences Applicability References Problem (Problem section describes the design issues faced by the developer) You want to encapsulate data access and manipulation in a separate layer. Read more on http://www.javaguides.net/2018/08/data-access-object-pattern-in-java.html