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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Messages<br />

Figure 31–5 shows how all these objects fit together in a JMS client application.<br />

FIGURE 31–5 <strong>The</strong> JMS API Programming Model<br />

Message<br />

Producer<br />

Sends<br />

To<br />

Destination<br />

Creates<br />

Connection<br />

Factory<br />

Connection<br />

Session<br />

Msg<br />

Creates<br />

Creates<br />

Creates<br />

This section describes all these objects briefly and provides sample commands and code<br />

snippets that show how to create and use the objects. <strong>The</strong> last subsection briefly describes JMS<br />

API exception handling.<br />

Examples that show how to combine all these objects in applications appear in later sections.<br />

For more details, see the JMS API documentation, which is part of the <strong>Java</strong> <strong>EE</strong> API<br />

documentation.<br />

JMS Administered Objects<br />

Creates<br />

Message<br />

Consumer<br />

Destination<br />

<strong>The</strong> JMS API Programming Model<br />

Receives<br />

From<br />

Two parts of a JMS application, destinations and connection factories, are best maintained<br />

administratively rather than programmatically. <strong>The</strong> technology underlying these objects is<br />

likely to be very different from one implementation of the JMS API to another. <strong>The</strong>refore, the<br />

management of these objects belongs with other administrative tasks that vary from provider to<br />

provider.<br />

Chapter 31 • <strong>The</strong> <strong>Java</strong> Message Service API 897

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

Saved successfully!

Ooh no, something went wrong!