7.1. Writing and Compiling the Application Components

The first and simplest application contains the following components:

  • An application client that sends several messages to a queue

  • A message-driven bean that asynchronously receives and processes the messages

Figure 7.1 illustrates the structure of this application.

Figure 7.1. A Simple J2EE Application: Client to Message-Driven Bean

The application client sends messages to the queue, which is created administratively, using the j2eeadmin command. The JMS provider—in this case, the J2EE server—delivers the messages to the message-driven bean instances, which then process the messages.

Writing ...

Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform 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.