Chapter 11. JMS scenario 363
򐂰 Enterprise Service Bus
The ESB is implemented using the service integration bus. The bus provides
the transport mechanism for the default messaging provider. Messages sent
to MailService are placed on a queue defined to the bus. A mediation will be
added to transform the format of the message payload from text to XML. This
mediation activity is transparent to the applications. If, in the future, a different
mail service is used and it requires something other than XML, the only
change required is in the mediation activity on the bus.
򐂰 Mail Sender
This component uses an EJB message-driven bean to receive the message
from the queue and the Java Mail API to send the e-mail to MailService.
򐂰 MailService
Our SMTP server, that sends the e-mail to the customer.
򐂰 XlateToXML
This component is a mediation application. When a message arrives at the
bus, this application transforms the message. The Mail Sender MDB receives
the transformed message.
This scenario illustrates the following application pattern using messaging
technology:
򐂰 Directly Integrated Single Channel application pattern
ITSOMart places a message on a queue. Mediation takes place to transform
the message into a new format. The Mail service retrieves the message and
sends an e-mail to the user.
11.2 System design overview
In this scenario, the ITSOMart application will be connected to an enterprise-tier
application (MailService) using JMS.
11.2.1 Component model
The ITSOMart will send a notification message to the customer when the
registration process is complete. The application does this by generating a JMS
message for MailService. The message contains the e-mail text to be sent.
MailService is expecting XML format so a mediation is added to the bus that
transforms the message to the proper format.
Figure 11-2 on page 364 shows the component model for the scenario.

Get Patterns: Implementing Self-Service in an SOA Environment 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.