Integration Layer

Integration layer consist several design patterns are as under

  • Service Activator
  • Data Access Object

Service Activator

Service activator design pattern is use to receive asynchronous requests and invoke one or more business services. On receiving a message, the Service Activator locates and invokes the necessary business methods on the business service components to fulfill the request asynchronously.

Uses
  • Use to invoke business services, POJOs, or EJB components in an asynchronous manner.
  • Use to integrate publish/subscribe and point-to-point messaging to enable asynchronous processing services.
  • Use to perform a business task that is logically composed of several business tasks.
Advantages
  • Provides asynchronous processing for any business-tier component.
  • Integrates JMS into enterprise applications.

Data Access Object [DAO]

Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data. The data source could be a persistent store like an RDBMS, an external service like a B2B exchange, a repository like an LDAP database. DAO make application data source independent that is DAO hides the underlying data source implementation from its clients. DAO interface to clients doesn't change when the underlying data source implementation changes.

Uses
  • Use to implement data access mechanisms to access and manipulate data in a persistent storage.
  • Use to decouple the persistent storage implementation from the rest of your application.
  • Use when underlying data source need to change acccording to requirement.
Advantages
  • Centralizes control with loosely coupled handlers.
  • Enables transparency.
  • Reduces code complexity for clients
  • Organizes all data access code into a separate layer.