Name

Message Façade Pattern

Goal

To hide business logic behind a standard façade that can be accessed asynchronously and maintained independently (Figure C-2).

Message façade
Figure C-2. Message façade

Participants

Client application

Creates a command message.

Command message

Carries information from the client to the façade.

Message façade

Uses the command message to access the business tier code.

Business tier code

Performs the actual processing to fulfill a use case.

Interactions

The client creates a command message and sends it to the message façade using any sort of message transport. The façade receives the message (using a polling consumer or an event-driven consumer) and uses the information it contains to access business tier code to fulfill a use case. Optionally, a return message is sent to the client confirming successful completion of the use case and returning data.

Notes

Also see the Business Delegate and Session Façade patterns.

Get J2EE Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.