Book Image

EJB 3 Developer Guide

By : Michael Sikora
Book Image

EJB 3 Developer Guide

By: Michael Sikora

Overview of this book

Table of Contents (18 chapters)
EJB 3 Developer Guide
Credits
About the Author
About the Reviewers
Preface
Annotations and Their Corresponding Packages

Java Message Service (JMS) API


The JMS API is a set of interfaces and classes that support two basic messaging modes: point-to-point and publish/subscribe.

In the point-to-point mode, the message producer sends a message to a queue. The message is read just once by a consumer. After the message is read it is deleted from the queue. There may be more than one potential consumer, however once a message has been read by one consumer it cannot be read by any of the remaining consumers. A consumer does not need to be registered with the queue at the time the message is sent. If no other consumer has read the message then the consumer can read the message as soon as it (the consumer) accesses the queue.

In the publish/subscribe mode, the message producer sends a message to a topic. One or more consumers register with, or subscribe to, a topic. The message remains in the topic until all consumers have read the message. If a consumer has not registered with a topic at the time the message is sent...