10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

31<br />

CHAPTER 31<br />

<strong>The</strong> <strong>Java</strong> Message Service API<br />

This chapter provides an introduction to the <strong>Java</strong> Message Service (JMS) API, a <strong>Java</strong> API that<br />

allows applications to create, send, receive, and read messages using reliable, asynchronous,<br />

loosely coupled communication. It covers the following topics:<br />

■ “Overview of the JMS API” on page 889<br />

■ “Basic JMS API Concepts” on page 892<br />

■ “<strong>The</strong> JMS API Programming Model” on page 896<br />

■ “Writing Simple JMS Client Applications” on page 906<br />

■ “Creating Robust JMS Applications” on page 929<br />

■ “Using the JMS API in a <strong>Java</strong> <strong>EE</strong> Application” on page 948<br />

■ “Further Information about JMS” on page 954<br />

Overview of the JMS API<br />

This overview of the JMS API answers the following questions.<br />

■ “What Is Messaging?” on page 889<br />

■ “What Is the JMS API?” on page 890<br />

■ “When Can You Use the JMS API?” on page 890<br />

■ “How Does the JMS API Work with the <strong>Java</strong> <strong>EE</strong> Platform?” on page 892<br />

What Is Messaging?<br />

Messaging is a method of communication between software components or applications. A<br />

messaging system is a peer-to-peer facility: A messaging client can send messages to, and<br />

receive messages from, any other client. Each client connects to a messaging agent that provides<br />

facilities for creating, sending, receiving, and reading messages.<br />

Messaging enables distributed communication that is loosely coupled. A component sends a<br />

message to a destination, and the recipient can retrieve the message from the destination.<br />

889

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!